{"id":"CVE-2026-125107","aliases":["CVE-2026-125107","GHSA-fhp4-pr5j-46m5"],"related":[],"kind":"vulnerability","state":"published","title":"Muhammara: NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key","summary":"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 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA 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.\n\n## Affected Version\n\nmuhammara <= 6.0.4 (latest)\n\n## Vulnerability Details\n\n**File:** `src/deps/PDFWriter/PDFParser.cpp` line 2107\n\n```cpp\nif (inDecodeParams)\n{\n    PDFObjectCastPtr<PDFInteger> earlyObj(\n        QueryDictionaryObject(inDecodeParams, \"EarlyChange\")\n    );\n    early = earlyObj->GetValue();  // NULL dereference when EarlyChange key is absent\n}\n```\n\nWhen `inDecodeParams` is non-NULL but lacks the `EarlyChange` key:\n1. `QueryDictionaryObject()` returns NULL\n2. `PDFObjectCastPtr<PDFInteger>(NULL)` wraps NULL\n3. `earlyObj->GetValue()` dereferences NULL → crash\n\n## PoC\n\n460-byte malicious PDF triggers crash via `startReadingFromStream()`:\n\n- PDF contains `/Filter /LZWDecode` with `/DecodeParms << >>` (empty, no EarlyChange)\n- Exit code: `0xC0000005` (Access Violation)\n\n## Fix\n\n```cpp\nif (earlyObj)\n    early = earlyObj->GetValue();\n```\n\n## Impact\n\nAny application accepting untrusted PDFs and using muhammara to read stream contents is vulnerable to DoS.\n\nSimilar to: CVE-2022-41957, CVE-2022-39381\n\n## PoC File\n[poc_muhammara_lzw_null.js](https://github.com/user-attachments/files/27186113/poc_muhammara_lzw_null.js)","format":"markdown","source":"ghsa"}],"published":"2026-06-26T20:55:18.000Z","modified":"2026-11-12T22:18:51.470Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"version":"< 6.0.5","status":"affected"}],"vendor":"julianhille","product":"MuhammaraJS","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.0.5"}],"ecosystem":"npm","package":"muhammara","purl":"pkg:npm/muhammara","source":"ghsa"}],"references":[{"url":"https://github.com/julianhille/MuhammaraJS/security/advisories/GHSA-fhp4-pr5j-46m5","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/julianhille/MuhammaraJS/commit/a98c07780241353334eb65bfca1df025f14be70b","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/julianhille/MuhammaraJS/releases/tag/6.0.5","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/julianhille/MuhammaraJS","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-11-10T16:12:53.511Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-125107","url":"https://www.cve.org/CVERecord?id=CVE-2026-125107","licence":"CVE Terms of Use","modified":"2026-11-10T16:13:16.839Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fhp4-pr5j-46m5","url":"https://github.com/advisories/GHSA-fhp4-pr5j-46m5","licence":"CC-BY-4.0","modified":"2026-11-09T21:45:11.101Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-125107","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125107","licence":"Public domain","modified":"2026-11-12T22:18:51.470Z"}],"updatedAt":"2026-11-25T22:59:49.673Z","epss":{"score":0.0051,"percentile":0.45005,"date":"2026-12-01T12:00:22.000Z"}}