FreeType: Remote Code Execution — GLSA 202505-07

A vulnerability has been discovered in FreeType, which can lead to remote code execution.

Affected packages

media-libs/freetype on all architectures
Affected versions < 2.13.1
Unaffected versions >= 2.13.1

Background

FreeType is a high-quality and portable font engine.

Description

Multiple vulnerabilities have been discovered in FreeType. Please review the CVE identifiers referenced below for details.

Impact

An out of bounds write exists in FreeType when attempting to parse font subglyph structures related to TrueType GX and variable font files. The vulnerable code assigns a signed short value to an unsigned long and then adds a static value causing it to wrap around and allocate too small of a heap buffer. The code then writes up to 6 signed long integers out of bounds relative to this buffer. This may result in arbitrary code execution. This vulnerability may have been exploited in the wild.

Workaround

There is no known workaround at this time.

Resolution

All FreeType users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=media-libs/freetype-2.13.1"
 

References

Release date
May 14, 2025

Latest revision
May 14, 2025: 1

Severity
high

Exploitable
local and remote

Bugzilla entries