CVE-2022-39381: CWE-690: Unchecked Return Value to NULL Pointer Dereference in julianhille MuhammaraJS
Muhammara is a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs). The package muhammara before 2.6.0; all versions of package hummus are vulnerable to Denial of Service (DoS) when supplied with a maliciously crafted PDF file to be appended to another. This issue has been patched in 2.6.0 for muhammara and not at all for hummus. As a workaround, do not process files from untrusted sources.
AI Analysis
Technical Summary
CVE-2022-39381 is a medium-severity vulnerability affecting the MuhammaraJS Node.js module, which provides C/C++ bindings for PDF manipulation in Node.js and Electron environments. MuhammaraJS is a successor or replacement for the hummusjs library. The vulnerability arises from an unchecked return value leading to a NULL pointer dereference (CWE-690) when processing maliciously crafted PDF files, specifically when appending one PDF to another. This flaw can cause the application to crash, resulting in a Denial of Service (DoS) condition. The issue affects all versions of hummusjs and MuhammaraJS versions prior to 2.6.0. The vulnerability has been patched in MuhammaraJS 2.6.0, but no fix exists for hummusjs. The root cause is the failure to verify that a pointer returned from an internal function is non-NULL before dereferencing it, which leads to application instability or crash when handling malformed PDFs. No known exploits have been reported in the wild, and the vulnerability requires the processing of maliciously crafted PDFs, which implies that the attacker must supply or influence the input files processed by the vulnerable software. The vulnerability primarily impacts applications that rely on these libraries for PDF manipulation, including those built on Node.js or Electron platforms, potentially affecting document processing workflows, PDF generation, or editing tools that incorporate MuhammaraJS or hummusjs.
Potential Impact
For European organizations, the primary impact of this vulnerability is the potential for Denial of Service in applications that use MuhammaraJS or hummusjs for PDF processing. This can disrupt business operations, particularly in sectors heavily reliant on automated document workflows such as legal, finance, government, and publishing. The DoS could be exploited by an attacker supplying malicious PDFs, causing application crashes and service interruptions. While the vulnerability does not directly lead to data breaches or code execution, the loss of availability can degrade service quality and may indirectly impact confidentiality and integrity if fallback mechanisms are insecure or if the DoS leads to operational errors. Organizations processing untrusted PDFs from external sources or customers are at higher risk. Since the vulnerability requires crafted input files, the attack surface is limited to scenarios where untrusted PDFs are ingested. The lack of a patch for hummusjs means legacy systems or applications still using this library remain vulnerable, increasing risk exposure. The impact is thus moderate but significant in environments where PDF processing is critical and continuous uptime is required.
Mitigation Recommendations
1. Upgrade MuhammaraJS to version 2.6.0 or later to apply the official patch that addresses the NULL pointer dereference issue. 2. For applications still using hummusjs, consider migrating to MuhammaraJS 2.6.0 or newer, as no patch exists for hummusjs. 3. Implement strict input validation and sanitization to reject or quarantine PDFs from untrusted or unknown sources before processing. 4. Employ sandboxing or process isolation for PDF processing tasks to contain potential crashes and prevent service-wide outages. 5. Monitor application logs for crashes or errors related to PDF processing to detect potential exploitation attempts. 6. Establish robust error handling around PDF manipulation functions to gracefully handle unexpected input without crashing. 7. Where feasible, use alternative, actively maintained PDF libraries with strong security track records. 8. Educate developers and system administrators about the risks of processing untrusted PDFs and enforce policies restricting such operations. 9. Conduct regular dependency audits to identify and update vulnerable libraries promptly. 10. For Electron-based applications, ensure that the PDF processing components run with the least privileges necessary to limit impact of crashes or exploitation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Belgium, Austria
CVE-2022-39381: CWE-690: Unchecked Return Value to NULL Pointer Dereference in julianhille MuhammaraJS
Description
Muhammara is a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs). The package muhammara before 2.6.0; all versions of package hummus are vulnerable to Denial of Service (DoS) when supplied with a maliciously crafted PDF file to be appended to another. This issue has been patched in 2.6.0 for muhammara and not at all for hummus. As a workaround, do not process files from untrusted sources.
AI-Powered Analysis
Technical Analysis
CVE-2022-39381 is a medium-severity vulnerability affecting the MuhammaraJS Node.js module, which provides C/C++ bindings for PDF manipulation in Node.js and Electron environments. MuhammaraJS is a successor or replacement for the hummusjs library. The vulnerability arises from an unchecked return value leading to a NULL pointer dereference (CWE-690) when processing maliciously crafted PDF files, specifically when appending one PDF to another. This flaw can cause the application to crash, resulting in a Denial of Service (DoS) condition. The issue affects all versions of hummusjs and MuhammaraJS versions prior to 2.6.0. The vulnerability has been patched in MuhammaraJS 2.6.0, but no fix exists for hummusjs. The root cause is the failure to verify that a pointer returned from an internal function is non-NULL before dereferencing it, which leads to application instability or crash when handling malformed PDFs. No known exploits have been reported in the wild, and the vulnerability requires the processing of maliciously crafted PDFs, which implies that the attacker must supply or influence the input files processed by the vulnerable software. The vulnerability primarily impacts applications that rely on these libraries for PDF manipulation, including those built on Node.js or Electron platforms, potentially affecting document processing workflows, PDF generation, or editing tools that incorporate MuhammaraJS or hummusjs.
Potential Impact
For European organizations, the primary impact of this vulnerability is the potential for Denial of Service in applications that use MuhammaraJS or hummusjs for PDF processing. This can disrupt business operations, particularly in sectors heavily reliant on automated document workflows such as legal, finance, government, and publishing. The DoS could be exploited by an attacker supplying malicious PDFs, causing application crashes and service interruptions. While the vulnerability does not directly lead to data breaches or code execution, the loss of availability can degrade service quality and may indirectly impact confidentiality and integrity if fallback mechanisms are insecure or if the DoS leads to operational errors. Organizations processing untrusted PDFs from external sources or customers are at higher risk. Since the vulnerability requires crafted input files, the attack surface is limited to scenarios where untrusted PDFs are ingested. The lack of a patch for hummusjs means legacy systems or applications still using this library remain vulnerable, increasing risk exposure. The impact is thus moderate but significant in environments where PDF processing is critical and continuous uptime is required.
Mitigation Recommendations
1. Upgrade MuhammaraJS to version 2.6.0 or later to apply the official patch that addresses the NULL pointer dereference issue. 2. For applications still using hummusjs, consider migrating to MuhammaraJS 2.6.0 or newer, as no patch exists for hummusjs. 3. Implement strict input validation and sanitization to reject or quarantine PDFs from untrusted or unknown sources before processing. 4. Employ sandboxing or process isolation for PDF processing tasks to contain potential crashes and prevent service-wide outages. 5. Monitor application logs for crashes or errors related to PDF processing to detect potential exploitation attempts. 6. Establish robust error handling around PDF manipulation functions to gracefully handle unexpected input without crashing. 7. Where feasible, use alternative, actively maintained PDF libraries with strong security track records. 8. Educate developers and system administrators about the risks of processing untrusted PDFs and enforce policies restricting such operations. 9. Conduct regular dependency audits to identify and update vulnerable libraries promptly. 10. For Electron-based applications, ensure that the PDF processing components run with the least privileges necessary to limit impact of crashes or exploitation.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-09-02T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf6c86
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 9:36:17 PM
Last updated: 8/18/2025, 8:20:12 AM
Views: 12
Related Threats
CVE-2025-41242: Vulnerability in VMware Spring Framework
MediumCVE-2025-47206: CWE-787 in QNAP Systems Inc. File Station 5
HighCVE-2025-5296: CWE-59 Improper Link Resolution Before File Access ('Link Following') in Schneider Electric SESU
HighCVE-2025-6625: CWE-20 Improper Input Validation in Schneider Electric Modicon M340
HighCVE-2025-57703: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Delta Electronics DIAEnergie
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.