{"answers":{"affected":"2 open source packages ship an affected version, including muhammara.","exploited":"There is no known exploitation of GHSA-fhp4-pr5j-46m5 in the wild and no public exploit code.","fix":"Upgrade muhammara to 6.0.5 or later.","what":"GHSA-fhp4-pr5j-46m5 is a vulnerability in muhammara, published on 26 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-fhp4-pr5j-46m5 and fix it if it is affected.\n\nWhat it is: GHSA-fhp4-pr5j-46m5 is a vulnerability in muhammara, published on 26 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-fhp4-pr5j-46m5 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- muhammara (npm): affected all versions; fixed in 6.0.5\n- muhammara (npm): affected all versions; fixed in 6.0.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-fhp4-pr5j-46m5/ (Markdown: https://insights.sbomify.com/GHSA-fhp4-pr5j-46m5/index.md)","id":"GHSA-fhp4-pr5j-46m5","markdown":"https://insights.sbomify.com/GHSA-fhp4-pr5j-46m5/index.md","name":"GHSA-fhp4-pr5j-46m5","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"PDF processing library","requires_auth":"none","summary":"A NULL pointer dereference in the muhammara PDF library allows attackers to cause a denial of service by providing a malicious PDF file.","user_interaction":"required","vuln_class":"null_dereference"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## 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 \u003c= 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\u003cPDFInteger\u003e earlyObj(\n        QueryDictionaryObject(inDecodeParams, \"EarlyChange\")\n    );\n    early = earlyObj-\u003eGetValue();  // 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\u003cPDFInteger\u003e(NULL)` wraps NULL\n3. `earlyObj-\u003eGetValue()` dereferences NULL → crash\n\n## PoC\n\n460-byte malicious PDF triggers crash via `startReadingFromStream()`:\n\n- PDF contains `/Filter /LZWDecode` with `/DecodeParms \u003c\u003c \u003e\u003e` (empty, no EarlyChange)\n- Exit code: `0xC0000005` (Access Violation)\n\n## Fix\n\n```cpp\nif (earlyObj)\n    early = earlyObj-\u003eGetValue();\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)","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key","id":"GHSA-fhp4-pr5j-46m5","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"null_dereference","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["6.0.5"],"introduced":["0"],"last_affected":[],"package":"muhammara","purl":null,"source":"GHSA-fhp4-pr5j-46m5"},{"ecosystem":"npm","fixed":["6.0.5"],"introduced":["0"],"last_affected":[],"package":"muhammara","purl":"pkg:npm/muhammara","source":"GHSA-fhp4-pr5j-46m5"}],"products":null,"published":"2026-06-26","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A NULL pointer dereference in the muhammara PDF library allows attackers to cause a denial of service by providing a malicious PDF file.","url":"https://insights.sbomify.com/GHSA-fhp4-pr5j-46m5/"}