OSV 1.4.0 · github-reviewed · 修改于 2026-07-18 00:52
发布时间
2026-05-30 01:52
GitHub 审查时间
2026-05-30 01:52
NVD 发布时间
2026-05-19 15:16
源文件
advisories/github-reviewed/2026/05/GHSA-rr89-w3h9-m66j/GHSA-rr89-w3h9-m66j.json
Versions of ExifReader from 4.20.0 through 4.38.1 do not bound the size of decompressed metadata blocks. When a caller invokes the asynchronous API (e.g. ExifReader.load(file) or ExifReader.load(buffer, {async: true})) on an attacker-supplied image, a small compressed chunk in the file can expand to hundreds of megabytes of memory, consuming heap and CPU until the process slows down or runs out of memory.
The affected paths share a single decompression utility, so the issue is reachable through any compressed metadata block the library handles asynchronously, including:
zTXt, compressed iTXt, and iCCP chunks (deflate)A typical proof of concept produced roughly 1000× expansion (for example, ~32 KB of compressed input expanded to ~32 MB of output, ~130 KB to ~128 MB).
Both the npm package and the dist/ bundle published from this repository (consumed by Bower and other users of the prebuilt artifact) are affected.
Fixed in 4.39.0. The decompression utility now reads the decompressed stream incrementally and aborts as soon as the running total would exceed a configurable limit. The default cap is 128 MiB per metadata block, which is well above any realistic legitimate value. When a block exceeds the cap, that block is skipped (a warning is emitted via console.warn) and the remaining tags are returned as usual.
The cap is configurable via the new maxDecompressedSize field on the decompress option, in bytes:
const tags = await ExifReader.load(file, {
async: true,
decompress: {
maxDecompressedSize: 16 * 1024 * 1024 // 16 MiB
}
});
The same cap applies to results returned by user-supplied custom brotli/deflate functions.