Summary
Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key
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
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:
QueryDictionaryObject()returns NULLPDFObjectCastPtr<PDFInteger>(NULL)wraps NULLearlyObj->GetValue()dereferences NULL → crash
PoC
460-byte malicious PDF triggers crash via startReadingFromStream():
- PDF contains
/Filter /LZWDecodewith/DecodeParms << >>(empty, no EarlyChange) - Exit code:
0xC0000005(Access Violation)
PoC File
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
The application dereferences a null pointer, causing a crash. Typical impact: denial of service via crash.
GHSA-FHP4-PR5J-46M5 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (6.0.5); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
if (earlyObj)
early = earlyObj->GetValue();
Frequently Asked Questions
- What is GHSA-FHP4-PR5J-46M5? GHSA-FHP4-PR5J-46M5 is a high-severity null pointer dereference vulnerability in muhammara (npm), affecting versions <= 6.0.4. It is fixed in 6.0.5. The application dereferences a null pointer, causing a crash.
- How severe is GHSA-FHP4-PR5J-46M5? GHSA-FHP4-PR5J-46M5 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of muhammara are affected by GHSA-FHP4-PR5J-46M5? muhammara (npm) versions <= 6.0.4 is affected.
- Is there a fix for GHSA-FHP4-PR5J-46M5? Yes. GHSA-FHP4-PR5J-46M5 is fixed in 6.0.5. Upgrade to this version or later.
- Is GHSA-FHP4-PR5J-46M5 exploitable, and should I be worried? Whether GHSA-FHP4-PR5J-46M5 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-FHP4-PR5J-46M5 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-FHP4-PR5J-46M5? Upgrade
muhammarato 6.0.5 or later.