VYPR
Unrated severityOSV Advisory· Published Jul 1, 2018· Updated Aug 5, 2024

CVE-2018-13037

CVE-2018-13037

Description

A heap-based buffer overflow in jpeg-compressor 0.1's bmp_load (stb_image.c) allows remote attackers to cause denial of service via a crafted JPEG file.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A heap-based buffer overflow in jpeg-compressor 0.1's bmp_load (stb_image.c) allows remote attackers to cause denial of service via a crafted JPEG file.

Vulnerability

The vulnerability resides in the extend_receive function within stb_image.c (line 1120) of jpeg-compressor version 0.1. A specially crafted JPEG file can trigger a global-buffer-overflow read, as demonstrated by AddressSanitizer output [1]. The flaw occurs during decoding of entropy-coded data in the JPEG image loading routine, accessible through the bmp_load function as described in the CVE [1].

Exploitation

An attacker can exploit this by crafting a malicious JPEG file and delivering it to a target system. When the file is processed by the vulnerable stb_image.c decoder via the encoder command (e.g., ./encoder ./crash_global_buffer_overflow 1.jpeg 50), the overflow is triggered [1]. The attacker needs no special privileges; only the ability to have the victim load the crafted image.

Impact

Successful exploitation results in a denial of service (application crash) due to a global-buffer-overflow. The CVE description also notes "possibly have unspecified other impact," but the provided reference only demonstrates a read-based overflow leading to a crash [1]. The attacker gains no code execution or privilege escalation based on available information.

Mitigation

As of the reference publication date (2018), no patch was available for jpeg-compressor 0.1 [1]. Users should consider avoiding use of this library for processing untrusted JPEG files, or transitioning to actively maintained alternatives. The vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog.

AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"A heap-based buffer overflow occurs in the bmp_load function due to improper handling of image data."

Attack vector

A remote attacker can trigger this vulnerability by providing a specially crafted BMP image file to the jpeg-compressor application. The application then attempts to load this image using the `bmp_load` function, leading to the overflow. This can result in a denial of service by crashing the application [ref_id=1].

Affected code

The vulnerability resides in the `bmp_load` function within the `stb_image.c` file. Specifically, the issue is related to memory access at offset 33680 overflowing a variable, as indicated by the ASan output [ref_id=1]. The overflow occurs during the processing of BMP image data.

What the fix does

The provided bundle does not contain information about a patch or specific remediation steps. Therefore, the advisory does not specify how the vulnerability is fixed. Users are advised to consult vendor advisories for the latest information on patches and mitigation strategies.

Preconditions

  • inputA specially crafted BMP image file.

Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.