VYPR
Unrated severityNVD Advisory· Published Sep 20, 2022· Updated May 28, 2025

CVE-2022-40009

CVE-2022-40009

Description

SWFTools commit 772e55a was discovered to contain a heap-use-after-free via the function grow_unicode at /lib/ttf.c.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A heap-use-after-free vulnerability in SWFTools commit 772e55a allows denial of service via a crafted TrueType font file.

Vulnerability

A heap-use-after-free vulnerability exists in SWFTools commit 772e55a in the grow_unicode function located in /lib/ttf.c. The bug occurs during the parsing of TrueType font tables via cmap_parse. When realloc is called to resize a memory region, the old pointer is freed, but a subsequent memset operation writes to the freed memory, causing a use-after-free. The affected version is the latest master commit 772e55a as reported in [1].

Exploitation

An attacker can trigger the vulnerability by providing a specially crafted TrueType font file to the ttftool utility. No authentication or special privileges are required; the attacker only needs to supply the malicious file as an argument. The tool processes the font, leading to the heap-use-after-free as shown in the AddressSanitizer trace in [1].

Impact

Successful exploitation results in a heap-use-after-free write, which typically causes a program crash (denial of service). Depending on memory layout, this vulnerability could potentially be leveraged for arbitrary code execution, though the reference only confirms a crash. The impact is limited to the ttftool process.

Mitigation

As of the publication date, no patch has been released for this vulnerability. The issue remains open in the SWFTools repository [1]. Users are advised to avoid processing untrusted TrueType font files with the affected version until a fix is available.

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

1

News mentions

0

No linked articles in our index yet.