Heap-Based Buffer Overflow Vulnerability in Graphite2 Package
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for graphite2.