Integer Overflow Vulnerability in libemf Package Leading to Denial of Service

libemf Updated 02 Oct 2025

Summary

15/06/2020
N/A
Yes i
Medium
5.5

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 ↓

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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

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