Integer Overflow Vulnerability in libemf Package Leading to Denial of Service
Summary
CVE-2020-13999: ScaleViewPortExtEx in libemf.cpp in libEMF (aka ECMA-234 Metafile Library) 1.0.12 allows an integer overflow and denial of service via a crafted EMF file. Affects libemf versions < 1.0.13-1. Fixed in 1.0.13-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
libemf is an ECMA-234 Metafile Library used for handling Enhanced Metafile Format (EMF) files. It provides functionalities for creating, manipulating, and rendering EMF files, which are commonly used in Windows applications for vector graphics. The library is widely utilized in various applications that require high-quality graphics rendering. However, it has been found to be vulnerable to an integer overflow issue that can lead to denial of service when processing specially crafted EMF files.
Vulnerability Detail
The vulnerability identified as CVE-2020-13999 in libemf arises from an integer overflow in the ScaleViewPortExtEx function located in libemf.cpp. This flaw allows an attacker to craft a malicious EMF file that, when processed by the library, can trigger an overflow condition. The consequences of this vulnerability include potential denial of service, where the application may crash or become unresponsive, impacting the availability of the service. The vulnerability affects multiple versions of the libemf package across different Debian ecosystems.
How To Fix
Minimum fixed version
1.0.13-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade libemf
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading is not immediately possible, users can mitigate the risk by avoiding the processing of untrusted EMF files. Additionally, implementing input validation to check the integrity of EMF files before processing can help reduce exposure to this vulnerability.
Conclusion
The CVE-2020-13999 vulnerability in the libemf package poses a significant risk of denial of service through integer overflow when handling crafted EMF files. Users are strongly advised to upgrade to the fixed version to ensure the security and stability of their applications.
See every vulnerability recorded for libemf →
FAQ
CVE-2020-13999 is a vulnerability in the libemf package that allows for an integer overflow leading to denial of service when processing crafted EMF files.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The primary impact is denial of service, where applications using the vulnerable version of libemf may crash or become unresponsive when processing malicious EMF files.
The CVSS score for CVE-2020-13999 is 5.5, indicating a moderate severity level.
If upgrading is not feasible, avoid processing untrusted EMF files and implement input validation to mitigate risks.
Related vulnerabilities
Recent vulnerabilities recorded for libemf.