Heap-Based Buffer Overflow Vulnerability in Graphite2 Package

graphite2 Updated 02 Oct 2025

Summary

13/02/2016
N/A
Yes i
High
8.8

CVE-2016-1522: Code.cpp in Libgraphite in Graphite 2 1.2.4, as used in Mozilla Firefox before 43.0 and Firefox ESR 38.x before 38.6.1, does not consider recursive load calls during a size check, which allows remote attackers to cause a... Affects graphite2 across 2 version ranges.

< 1.3.5-1 < 6c7f2aa8d4f5d75d3f2ebbb019c4a7e2b0607461

Fixed in 1.3.5-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Graphite2 is a library designed for rendering complex scripts and fonts, particularly those that require advanced typographic features. It is widely used in applications such as Mozilla Firefox for handling smart fonts. The library's functionality includes support for various font formats and rendering techniques, making it essential for applications that require high-quality text display. However, a vulnerability has been identified in Graphite2 that could lead to severe security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2016-1522, arises from a flaw in the Code.cpp file of the Libgraphite component of Graphite2 version 1.2.4. This issue occurs due to the failure to properly handle recursive load calls during a size check, which can lead to a heap-based buffer overflow. Attackers can exploit this vulnerability by crafting malicious Graphite smart fonts, potentially causing a denial of service or executing arbitrary code. The CVSS score for this vulnerability is 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

1.3.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade graphite2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can avoid opening untrusted Graphite smart fonts until the package is updated. Additionally, disabling the use of Graphite fonts in applications that support this feature can mitigate the risk until a fix is applied.

Conclusion

The CVE-2016-1522 vulnerability in the Graphite2 package poses serious security risks, including potential arbitrary code execution and denial of service. Users are strongly advised to update their packages to the latest version to mitigate these risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for graphite2 →

Share this vulnerability

FAQ

CVE-2016-1522 is a vulnerability in the Graphite2 library that can lead to a heap-based buffer overflow, allowing attackers to execute arbitrary code.

You can use Vulert's playground to check if your application is affected by this vulnerability without requiring any installation. Visit Vulert Scanner.

Exploitation of this vulnerability could result in a denial of service or arbitrary code execution, posing significant security risks to affected systems.

Yes, updating to Graphite2 version 1.3.5-1 or later will resolve the vulnerability.

If an immediate update is not possible, avoid using untrusted Graphite smart fonts and consider disabling Graphite font support in your applications.

Related vulnerabilities

Recent vulnerabilities recorded for graphite2.

How To Fix

Minimum fixed version

1.3.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade graphite2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback