CVE-2022-27406
High · 7.5CVSS
7.5
EPSS
3.3%
Published
Apr 22, 2022
CISA due date
—
Cloudanix analysis
A problem in software that handles fonts could let attackers take control of programs that display text from untrusted sources.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
The vulnerability is a buffer overflow in the FreeType font rendering library that can cause memory corruption.
Why it matters to the business
Applications using FreeType may crash or be compromised when processing malicious fonts, affecting document viewers, browsers, and other software that renders text; the issue has been public for over four years with exploit code available.
How an attack unfolds
An attacker crafts a malicious font file that triggers the buffer overflow when loaded by the vulnerable FreeType library, potentially leading to arbitrary code execution. Exploit code is publicly available.
How to fix it
Update FreeType to the fixed version in commit e50798b72043c8b378caa46e0a854519f9028ae4 or later.
How to confirm the fix worked
Verify the installed FreeType version or commit hash matches the fixed one.
Typical attack path
- Deliver malicious font file to target application
- Trigger font parsing in FreeType
- Exploit buffer overflow for code execution or denial of service
How to detect it
Look for crashes in applications using FreeType when processing font files; check for known exploit patterns if available.
What your security team should do
- Upgrade FreeType library to the patched commit
- Scan environments for outdated FreeType instances
- Review application dependencies for FreeType usage
The record
FreeType commit 22a0cccb4d9d002f33c1ba7a4b36812c7d4f46b5 was discovered to contain a segmentation violation via the function FT_Request_Size.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | freetype | 0 | 2.9.1-9.el8 |
| AlmaLinux:8 | freetype-devel | 0 | 2.9.1-9.el8 |
| AlmaLinux:9 | freetype | 0 | 2.10.4-9.el9 |
| AlmaLinux:9 | freetype-devel | 0 | 2.10.4-9.el9 |
| Alpine:v3.12 | freetype | 0 | 2.10.4-r2 |
| Alpine:v3.13 | freetype | 0 | 2.10.4-r3 |
| Alpine:v3.14 | freetype | 0 | 2.10.4-r3 |
| Alpine:v3.15 | freetype | 0 | 2.11.1-r2 |
| Alpine:v3.16 | freetype | 0 | 2.12.1-r0 |
| Alpine:v3.17 | freetype | 0 | 2.12.1-r0 |
| Alpine:v3.18 | freetype | 0 | 2.12.1-r0 |
| Alpine:v3.19 | freetype | 0 | 2.12.1-r0 |
| Alpine:v3.20 | freetype | 0 | 2.12.1-r0 |
| Alpine:v3.21 | freetype | 0 | 2.12.1-r0 |
| Alpine:v3.22 | freetype | 0 | 2.12.1-r0 |
| Chainguard | freetype | 0 | 0 |
| Chainguard | freetype-dev | 0 | 0 |
| Chainguard | freetype-doc | 0 | 0 |
| Chainguard | freetype-static | 0 | 0 |
| Debian:11 | freetype | 0 | 2.10.4+dfsg-1+deb11u1 |
| Debian:12 | freetype | 0 | 2.11.1+dfsg-2 |
| Debian:13 | freetype | 0 | 2.11.1+dfsg-2 |
| Debian:14 | freetype | 0 | 2.11.1+dfsg-2 |
| Mageia:8 | freetype2 | 0 | 2.10.4-2.1.mga8 |
| Mageia:8 | freetype2 | 0 | 2.10.4-2.1.mga8.tainted |
| Red Hat:enterprise_linux:8::baseos | freetype | 0 | 0:2.9.1-9.el8 |
| Red Hat:enterprise_linux:8::baseos | freetype-debuginfo | 0 | 0:2.9.1-9.el8 |
| Red Hat:enterprise_linux:8::baseos | freetype-debugsource | 0 | 0:2.9.1-9.el8 |
| Red Hat:enterprise_linux:8::baseos | freetype-demos-debuginfo | 0 | 0:2.9.1-9.el8 |
| Red Hat:enterprise_linux:8::baseos | freetype-devel | 0 | 0:2.9.1-9.el8 |
| Red Hat:enterprise_linux:9::appstream | freetype | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::appstream | freetype-debuginfo | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::appstream | freetype-debugsource | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::appstream | freetype-demos-debuginfo | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::appstream | freetype-devel | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::baseos | freetype | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::baseos | freetype-debuginfo | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::baseos | freetype-debugsource | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::baseos | freetype-demos-debuginfo | 0 | 0:2.10.4-9.el9 |
| Red Hat:enterprise_linux:9::baseos | freetype-devel | 0 | 0:2.10.4-9.el9 |
| Red Hat:rhel_eus:8.6::baseos | freetype | 0 | 0:2.9.1-5.el8_6.3 |
| Red Hat:rhel_eus:8.6::baseos | freetype-debuginfo | 0 | 0:2.9.1-5.el8_6.3 |
| Red Hat:rhel_eus:8.6::baseos | freetype-debugsource | 0 | 0:2.9.1-5.el8_6.3 |
| Red Hat:rhel_eus:8.6::baseos | freetype-demos-debuginfo | 0 | 0:2.9.1-5.el8_6.3 |
| Red Hat:rhel_eus:8.6::baseos | freetype-devel | 0 | 0:2.9.1-5.el8_6.3 |
| Rocky Linux:8 | freetype | 0 | 0:2.9.1-9.el8 |
| Rocky Linux:9 | freetype | 0 | 0:2.10.4-9.el9 |
| SUSE:Enterprise Storage 6 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Enterprise Storage 7 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Enterprise Storage 7 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Micro 5.1 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Micro 5.2 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP4 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server 15-LTSS | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Manager Proxy 4.1 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Manager Proxy 4.1 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Manager Retail Branch Server 4.1 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Manager Retail Branch Server 4.1 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Manager Server 4.1 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| SUSE:Manager Server 4.1 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| Ubuntu:18.04:LTS | freetype | 0 | 2.8.1-2ubuntu2.2 |
| Ubuntu:20.04:LTS | freetype | 0 | 2.10.1-2ubuntu0.2 |
| Ubuntu:22.04:LTS | freetype | 0 | 2.11.1+dfsg-1ubuntu0.1 |
| Ubuntu:Pro:14.04:LTS | freetype | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | freetype | 0 | 2.6.1-0.1ubuntu2.5+esm1 |
| Wolfi | freetype | 0 | 0 |
| Wolfi | freetype-dev | 0 | 0 |
| Wolfi | freetype-doc | 0 | 0 |
| Wolfi | freetype-static | 0 | 0 |
| openSUSE:Leap 15.3 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| openSUSE:Leap 15.3 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| openSUSE:Leap 15.4 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| openSUSE:Leap 15.4 | ft2demos | 0 | 2.10.4-150000.4.12.1 |
| openSUSE:Leap Micro 5.2 | freetype2 | 0 | 2.10.4-150000.4.12.1 |
| openSUSE:Tumbleweed | freetype2 | 0 | 2.12.1-3.1 |
Related vulnerabilities
- CVE-2025-27363 An out of bounds write exists in FreeType versions 2.13.0 and below (newer versions of… Also affects freetype
- CVE-2022-27405 FreeType commit 53dfdcd8198d2b3201a23c4bad9190519ba918db was discovered to contain a… Also affects freetype
- CVE-2020-15999 Heap buffer overflow in Freetype in Google Chrome prior to 86.0.4240.111 allowed a remote… Also affects freetype
- CVE-2017-8105 FreeType 2 before 2017-03-24 has an out-of-bounds write caused by a heap-based buffer… Also affects freetype
- CVE-2015-9381 FreeType before 2.6.1 has a heap-based buffer over-read in T1_Get_Private_Dict in… Also affects freetype
- CVE-2015-9383 FreeType before 2.6.2 has a heap-based buffer over-read in tt_cmap14_validate in… Also affects freetype
- CVE-2016-10244 The parse_charstrings function in type1/t1load.c in FreeType 2 before 2.7 does not ensure… Also affects freetype
- CVE-2014-9745 The parse_encoding function in type1/t1load.c in FreeType before 2.5.3 allows remote… Also affects freetype