Exiv2
GHSA-9v3x-mhg4-wwv2
Out-of-bounds stack access in built-in HTTP request construction
Low · Public source snapshot: November 12, 2026
Original portfolio report · Upstream commit · Source reference · Source reference · Source reference · Public advisory
Shared credits and the scope of my investigation are documented below.
Exiv2's built-in HttpIo implementation formatted an HTTP request into a fixed-size stack buffer and then used snprintf()'s return value as though it were the number of bytes actually written. When the formatted request was too large, that value exceeded the buffer capacity and was reused for a terminator write, a std::string construction, and a socket send.
The public report demonstrated out-of-bounds stack access, process termination, and transmission of bytes beyond the declared buffer to the selected HTTP endpoint. The affected path requires WebReady support with the built-in HTTP implementation; WebReady is disabled by default in the confirmed affected release.
A bounded formatter may report the length that would have been required for an untruncated result. Callers must reject truncation before using that length for indexing, copying, string construction, or I/O.
| Field | Public record |
|---|---|
| Identifier | GHSA-9v3x-mhg4-wwv2 |
| Project | Exiv2 |
| Public severity | Low |
| CWE | CWE-125 — Out-of-bounds Read; CWE-787 — Out-of-bounds Write |
| Affected | Versions through 0.28.8, per the maintainer advisory |
| Fixed | 0.28.9 |
| Confirmed configuration | EXIV2_ENABLE_WEBREADY=ON, EXIV2_ENABLE_CURL=OFF |
| Fix | PR #9410 / commit d9db8b7e28d9f1b129d85e9599f04ff2a2933b9d on 0.28.x |
The issue was in the request construction performed by Exiv2::http(). A truncated snprintf() call returns the full required length, not the stored length. The vulnerable code did not reject that condition before using the value beyond the stack array.
The public issue documents:
- a stack out-of-bounds terminator write;
- out-of-bounds reads during string construction and socket transmission;
- transmission of adjacent stack bytes to the chosen HTTP server; and
- process termination.
The public evidence does not demonstrate code execution, controlled corruption beyond the terminator write, privilege escalation, or recovery of a specific secret. Workflows using CurlIo, and default builds without WebReady support, do not reach the confirmed path.
The maintainer advisory lists Exiv2 versions through 0.28.8 as affected and 0.28.9 as patched. The public report dynamically reproduced the issue on the official 0.28.8 release. The 0.28.9 tag contains the 0.28.x fix merged through PR #9410.
The fix checks the formatter result before it is reused. A negative result or a result greater than or equal to the supplied capacity is rejected as an oversized request. Regression coverage should exercise the exact buffer boundary, a one-byte overflow condition, long URLs, and large remote-edit request bodies.
The maintainer published GHSA-9v3x-mhg4-wwv2 on August 30, 2026. The advisory, public issue, maintainer fix, and public reproduction material are available, so a full public write-up is appropriate.
The GitHub advisory credits the-vibe-dev (my GitHub account) as a reporter. The fix was authored by the Exiv2 maintainers.
Use the public reproduction material only in disposable environments or on systems you are explicitly authorized to assess.