Muhammara: NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key
cve-program · CVE-2026-125107
PublishedMuhammara is a node module with c/cpp bindings to modify PDF with JavaScript for node or electron. Prior to 6.0.5, Muhammara PDFParser::CreateFilterForStream() in src/deps/PDFWriter/PDFParser.cpp dereferences a null PDFInteger pointer when a PDF stream uses the LZWDecode filter with a DecodeParms dictionary that omits the EarlyChange key. An application that processes an untrusted PDF and reads the affected stream can crash, causing a denial of service. This issue is fixed in version 6.0.5.
Read the publisher's advisoryeuvd · EUVD-2026-120461
PublishedMuhammara is a node module with c/cpp bindings to modify PDF with JavaScript for node or electron. Prior to 6.0.5, Muhammara PDFParser::CreateFilterForStream() in src/deps/PDFWriter/PDFParser.cpp dereferences a null PDFInteger pointer when a PDF stream uses the LZWDecode filter with a DecodeParms dictionary that omits the EarlyChange key. An application that processes an untrusted PDF and reads the affected stream can crash, causing a denial of service. This issue is fixed in version 6.0.5.
Read the publisher's advisorynvd · CVE-2026-125107
PublishedMuhammara is a node module with c/cpp bindings to modify PDF with JavaScript for node or electron. Prior to 6.0.5, Muhammara PDFParser::CreateFilterForStream() in src/deps/PDFWriter/PDFParser.cpp dereferences a null PDFInteger pointer when a PDF stream uses the LZWDecode filter with a DecodeParms dictionary that omits the EarlyChange key. An application that processes an untrusted PDF and reads the affected stream can crash, causing a denial of service. This issue is fixed in version 6.0.5.
Read the publisher's advisoryosv · GHSA-fhp4-pr5j-46m5
Published## Summary A NULL pointer dereference vulnerability exists in `PDFParser::CreateFilterForStream()` when processing a PDF stream with `/Filter /LZWDecode` and a `/DecodeParms` dictionary that does not contain the `EarlyChange` key. This causes an access violation (0xC0000005) and crashes the process. ## Affected Version muhammara <= 6.0.4 (latest) ## Vulnerability Details **File:** `src/deps/PDFWriter/PDFParser.cpp` line 2107 ```cpp if (inDecodeParams) { PDFObjectCastPtr<PDFInteger> earlyObj( QueryDictionaryObject(inDecodeParams, "EarlyChange") ); early = earlyObj->GetValue(); // NULL dereference when EarlyChange key is absent } ``` When `inDecodeParams` is non-NULL but lacks the `EarlyChange` key: 1. `QueryDictionaryObject()` returns NULL 2. `PDFObjectCastPtr<PDFInteger>(NULL)` wraps NULL 3. `earlyObj->GetValue()` dereferences NULL → crash ## PoC 460-byte malicious PDF triggers crash via `startReadingFromStream()`: - PDF contains `/Filter /LZWDecode` with `/DecodeParms << >>` (empty, no EarlyChange) - Exit code: `0xC0000005` (Access Violation) ## Fix ```cpp if (earlyObj) early = earlyObj->GetValue(); ``` ## Impact Any application accepting untrusted PDFs and using muhammara to read stream contents is vulnerable to DoS. Similar to: CVE-2022-41957, CVE-2022-39381 ## PoC File [poc_muhammara_lzw_null.js](https://github.com/user-attachments/files/27186113/poc_muhammara_lzw_null.js)
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2026-125107 · CVE overview and exploitation status
cve-program · CVE-2026-125107
- https://github.com/julianhille/MuhammaraJS/security/advisories/GHSA-fhp4-pr5j-46m5
- https://github.com/julianhille/MuhammaraJS/commit/a98c07780241353334eb65bfca1df025f14be70b
- https://github.com/julianhille/MuhammaraJS/releases/tag/6.0.5
euvd · EUVD-2026-120461
- https://github.com/julianhille/MuhammaraJS/security/advisories/GHSA-fhp4-pr5j-46m5
- https://github.com/julianhille/MuhammaraJS/commit/a98c07780241353334eb65bfca1df025f14be70b
- https://github.com/julianhille/MuhammaraJS/releases/tag/6.0.5
nvd · CVE-2026-125107
- https://github.com/julianhille/MuhammaraJS/commit/a98c07780241353334eb65bfca1df025f14be70b
- https://github.com/julianhille/MuhammaraJS/releases/tag/6.0.5
- https://github.com/julianhille/MuhammaraJS/security/advisories/GHSA-fhp4-pr5j-46m5
osv · GHSA-fhp4-pr5j-46m5
Related changes
Linked by CVE identifier- Muhammara is a node module with c/cpp bindings to modify PDF with JavaScript for node or electron. Prior to 6.0.5, Muhammara PDFParser::CreateFilterForStream() in src/deps/PDFWriter/PDFParser.cpp dereferences a null PDFInteger pointer when … · Advisory content revised · 13 Nov 2026
- Muhammara: NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key · Newly collected advisory · 9 Nov 2026
- Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key · Advisory content revised · 9 Nov 2026