Memory Allocation with Excessive Size Value Affecting golang.org/x/image/font/sfnt package, versions <0.39.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.11% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GOLANGORGXIMAGEFONTSFNT-16135922
  • published6 May 2026
  • disclosed21 Apr 2026
  • creditAndy Gill, ZephrSec Ltd

Introduced: 21 Apr 2026

CVE-2026-33812  (opens in a new tab)
CWE-789  (opens in a new tab)

How to fix?

Upgrade golang.org/x/image/font/sfnt to version 0.39.0 or higher.

Overview

Affected versions of this package are vulnerable to Memory Allocation with Excessive Size Value through the source.view path in font/sfnt. An attacker can force the parser to allocate a large read buffer by supplying a corrupt or malicious font file that advertises data beyond the file's actual contents, triggering a ReadAt request for more than 1 MiB. This can exhaust memory during font parsing, causing the process to slow down or fail while handling untrusted font data.

CVSS Base Scores

version 4.0
version 3.1