CVE-2017-8105
Critical · 9.8CVSS
9.8
EPSS
4.4%
Published
Apr 24, 2017
CISA due date
—
Cloudanix analysis
A flaw in a widely used font library lets attackers take over a computer by sending a specially made font file, so organizations should update the library wherever it is used.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in t1_decoder_parse_charstrings allows an out-of-bounds write during Type 1 font charstring parsing.
Why it matters to the business
Remote attackers can achieve arbitrary code execution on systems that process untrusted fonts, risking full host compromise, data theft, or ransomware deployment; the flaw affects many applications embedding FreeType and has remained unpatched in some downstream packages for years.
How an attack unfolds
An attacker crafts a malicious Type 1 font containing oversized or malformed charstrings, delivers it via network or file to any application using the vulnerable FreeType library, and triggers t1_decoder_parse_charstrings to overflow the heap buffer and overwrite adjacent memory for code execution.
How to fix it
Upgrade FreeType to a build containing commit 069083cccd73d1d68da68116c8d050bb62cdfe0e or later; for moodle (Bitnami) deployments upgrade to version 3.5.18 or newer. Rebuild and redeploy any statically linked applications. Remove or sandbox legacy font handling paths until patches are applied.
How to confirm the fix worked
Verify installed FreeType version or commit hash against the fixed commit; run regression tests that exercise Type 1 font parsing with the original proof-of-concept corpus; confirm absence of the vulnerable t1decode.c code path via source or binary analysis.
Typical attack path
- Identify a target application or service that renders or parses fonts with the vulnerable FreeType version
- Prepare a specially crafted Type 1 font file that triggers the buffer overflow in t1_decoder_parse_charstrings
- Deliver the font to the victim (web page, document attachment, or network protocol)
- Trigger font processing to execute the overflow and gain control of the process
- Escalate privileges or move laterally as needed
How to detect it
Search application and system logs for crashes or memory-corruption signals while processing Type 1 fonts; inspect process memory dumps or core files for heap corruption patterns near font parsing routines; review file-access logs for unexpected .pfb or .pfa files introduced around the time of any anomalous process behavior.
What your security team should do
- Immediately inventory all systems and containers that ship or link FreeType and schedule upgrades
- Prioritize patching internet-facing services that accept user-supplied fonts or documents
- Apply least-privilege sandboxing around font-rendering processes
- Monitor EPSS and KEV feeds for any future increase in observed exploitation
The record
FreeType 2 before 2017-03-24 has an out-of-bounds write caused by a heap-based buffer overflow related to the t1_decoder_parse_charstrings function in psaux/t1decode.c.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.11 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.12 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.13 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.14 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.15 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.16 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.17 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.18 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.19 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.2 | freetype | 0 | 2.5.5-r1 |
| Alpine:v3.20 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.21 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.22 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.3 | freetype | 0 | 2.6.3-r0 |
| Alpine:v3.4 | freetype | 0 | 2.6.3-r1 |
| Alpine:v3.5 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.6 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.7 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.8 | freetype | 0 | 2.7.1-r1 |
| Alpine:v3.9 | freetype | 0 | 2.7.1-r1 |
| Debian:11 | freetype | 0 | 2.6.3-3.2 |
| Debian:12 | freetype | 0 | 2.6.3-3.2 |
| Debian:13 | freetype | 0 | 2.6.3-3.2 |
| Debian:14 | freetype | 0 | 2.6.3-3.2 |
| Debian:7 | freetype | 0 | 2.4.9-1.1+deb7u6 |
| Debian:8 | freetype | 0 | 2.5.2-3+deb8u2 |
| Mageia:5 | freetype2 | 0 | 2.5.4-2.3.mga5 |
| Mageia:5 | freetype2 | 0 | 2.5.4-2.3.mga5.tainted |
| SUSE:Linux Enterprise Desktop 12 SP2 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server 11 SP4 | freetype2 | 0 | 2.3.7-25.45.5.1 |
| SUSE:Linux Enterprise Server 11 SP4 | ft2demos | 0 | 2.3.7-25.45.5.1 |
| SUSE:Linux Enterprise Server 12 SP2 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server 12 SP2 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server 12 SP3 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server 12 SP3 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | freetype2 | 0 | 2.3.7-25.45.5.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | ft2demos | 0 | 2.3.7-25.45.5.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | ft2demos | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | freetype2 | 0 | 2.3.7-25.45.5.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | freetype2 | 0 | 2.6.3-7.15.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | freetype2 | 0 | 2.6.3-7.15.1 |
| Ubuntu:14.04:LTS | freetype | 0 | 2.5.2-1ubuntu2.8 |
| Ubuntu:16.04:LTS | freetype | 0 | 2.6.1-0.1ubuntu2.3 |
| openSUSE:Tumbleweed | freetype2 | 0 | 2.11.0-1.2 |
Related vulnerabilities
- CVE-2020-15999 Heap buffer overflow in Freetype in Google Chrome prior to 86.0.4240.111 allowed a remote… Also affects freetype
- CVE-2022-27406 FreeType commit 22a0cccb4d9d002f33c1ba7a4b36812c7d4f46b5 was discovered to contain a… Also affects freetype
- CVE-2022-27405 FreeType commit 53dfdcd8198d2b3201a23c4bad9190519ba918db was discovered to contain a… 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-2025-27363 An out of bounds write exists in FreeType versions 2.13.0 and below (newer versions of… 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-2014-9745 The parse_encoding function in type1/t1load.c in FreeType before 2.5.3 allows remote… Also affects freetype