# EEF-CVE-2026-111497: Out-of-bounds write in the Brotli decoder bundled with erl-brotli

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-10-22T13:35:41.975Z
- Modified: 2026-11-25T06:30:07.751Z
- Related: CVE-2026-111497
- Weaknesses: CWE-787

## Description

## Summary

Out-of-bounds Write vulnerability in the bundled Brotli decoder in yjh0502 erl-brotli allows an attacker who supplies a crafted Brotli-compressed stream to `brotli:decode/1` to corrupt decoder state memory, disclose memory contents, crash the Erlang VM, or potentially execute code.

erl-brotli compiles its own copy of the Google Brotli C sources under `c_src` into a NIF, and `brotli_decoder_decompress_stream` in `c_src/brotli_nif.c` hands the input to `BrotliDecoderDecompressStream`. In `c_src/dec/decode.c`, `DecodeBlockTypeAndLength` returns false for a block switch in a category with at most one block type, and the non-streaming callers `DecodeLiteralBlockSwitch`, `DecodeCommandBlockSwitch` and `DecodeDistanceBlockSwitch` discard that result, so decoding continues with inconsistent state. The decoder runs inside a NIF, so memory corruption or a crash takes down the whole VM rather than the calling process. Because the package carries its own copy of the library, the Brotli version installed on the host does not matter.

This issue affects brotli: from 0.3.0 before 0.3.4.

## Impact

An attacker who can get an application to decode a Brotli stream they control, for example an HTTP client that decompresses `Content-Encoding: br` responses with this package, can crash the Erlang VM and potentially run code inside it.

(As written by Erlang Ecosystem Foundation.)

## Affected

- brotli (Hex): from 0.3.0 before 0.3.4
- https://github.com/yjh0502/erl-brotli: from 1e2af9bebba40ee292abf51e19ac831c2658ca47 before 7498e1c743c71a99636e8f897b6b016433830d6d

## References

- <https://github.com/yjh0502/erl-brotli/issues/23> (web)
- <https://cna.erlef.org/cves/CVE-2026-111497.html> (web)
- <https://github.com/yjh0502/erl-brotli/releases/tag/v0.3.4> (web)
- <https://github.com/yjh0502/erl-brotli/commit/1e2af9bebba40ee292abf51e19ac831c2658ca47> (web)
- <https://github.com/yjh0502/erl-brotli/commit/7498e1c743c71a99636e8f897b6b016433830d6d> (fix)
- <https://hex.pm/packages/brotli> (package)

## Sources

- Erlang Ecosystem Foundation: [EEF-CVE-2026-111497](https://osv.dev/vulnerability/EEF-CVE-2026-111497), CC-BY-4.0, modified 2026-11-25

---

Page: https://cve.day/EEF-CVE-2026-111497 · Whole record: https://cve.day/EEF-CVE-2026-111497.json · Rebuilt by cve.day 2026-11-25T22:17:16.483Z
