CVE-2021-40226
High · 7.5CVSS
7.5
EPSS
0.8%
Published
Nov 10, 2022
CISA due date
—
Cloudanix analysis
A bug in PDF reading code can make certain web applications crash when they try to open specially made files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Buffer overflow in PDF parsing component of xpdfreader 4.03 allows remote unauthenticated attackers to trigger memory corruption resulting in denial of service (availability impact only).
Why it matters to the business
Systems processing untrusted PDF documents may experience unexpected crashes and service interruptions; the issue affects next.js deployments that incorporate the vulnerable PDF handling code with no observed ransomware or KEV usage and low EPSS.
How an attack unfolds
An attacker supplies a specially crafted PDF file over the network; when the vulnerable xpdfreader parser in affected next.js instances processes the file, the buffer overflow occurs and the application terminates.
How to fix it
Upgrade vercel/next.js (GIT) to the fixed commit 07431d3e0f057a0bd58af6d456e4bee646fd8b42; rebuild and redeploy all affected instances.
How to confirm the fix worked
Confirm next.js source or deployed artifacts contain commit 07431d3e0f057a0bd58af6d456e4bee646fd8b42; re-test PDF processing paths with boundary-case inputs.
Typical attack path
- Craft malicious PDF that exceeds buffer bounds in xpdfreader 4.03
- Deliver the PDF via network request, file upload, or linked resource
- Trigger PDF processing path within next.js application
- Buffer overflow leads to crash and denial of service
How to detect it
Review application and system logs for segmentation faults or abrupt process termination during PDF parsing operations; correlate with inbound PDF file handling events.
What your security team should do
- Immediately update all next.js instances to the listed fixed commit
- Harden PDF handling surfaces with additional input validation until patches are applied
- Monitor EPSS trend and re-evaluate if exploitation maturity increases
The record
xpdfreader 4.03 is vulnerable to Buffer Overflow.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:16.04:LTS | ipe | 0 | No fix |
| Ubuntu:16.04:LTS | xpdf | 0 | No fix |
| Ubuntu:18.04:LTS | ipe | 0 | No fix |
| Ubuntu:18.04:LTS | xpdf | 0 | No fix |
| Ubuntu:20.04:LTS | ipe | 0 | No fix |
| Ubuntu:22.04:LTS | ipe | 0 | No fix |
| Ubuntu:22.04:LTS | xpdf | 0 | No fix |
| Ubuntu:24.04:LTS | ipe | 0 | No fix |
| Ubuntu:24.04:LTS | xpdf | 0 | No fix |
| Ubuntu:24.10 | ipe | 0 | No fix |
| Ubuntu:24.10 | xpdf | 0 | No fix |
| Ubuntu:25.04 | ipe | 0 | No fix |
| Ubuntu:25.04 | xpdf | 0 | No fix |
| Ubuntu:25.10 | ipe | 0 | No fix |
| Ubuntu:25.10 | xpdf | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | ipe | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | xpdf | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ipe | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | xpdf | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | ipe | 0 | No fix |
Related vulnerabilities
- CVE-2024-7868 In Xpdf 4.05 (and earlier), invalid header info in a DCT (JPEG) stream can lead to an… Also affects ipe
- CVE-2024-7867 In Xpdf 4.05 (and earlier), very large coordinates in a page box can cause an integer… Also affects ipe
- CVE-2024-7866 In Xpdf 4.05 (and earlier), a PDF object loop in a pattern resource leads to infinite… Also affects ipe
- CVE-2024-4976 Out-of-bounds array write in Xpdf 4.05 and earlier, due to missing object type check in… Also affects ipe
- CVE-2024-4568 In Xpdf 4.05 (and earlier), a PDF object loop in the PDF resources leads to infinite… Also affects ipe
- CVE-2024-4141 Out-of-bounds array write in Xpdf 4.05 and earlier, triggered by an invalid character… Also affects ipe
- CVE-2024-3900 Out-of-bounds array write in Xpdf 4.05 and earlier, triggered by long Unicode sequence in… Also affects ipe
- CVE-2024-3247 In Xpdf 4.05 (and earlier), a PDF object loop in an object stream leads to infinite… Also affects ipe