CVE-2024-35184
📋 TL;DR
This vulnerability in Paperless-ngx allows remote authenticated users to access the API even when API access has been explicitly disabled in the configuration. This affects all Paperless-ngx installations running versions 2.5.0 through 2.8.5 where administrators have disabled API access for security reasons.
💻 Affected Systems
- Paperless-ngx
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Authenticated users could bypass API access restrictions to perform unauthorized document operations, potentially accessing, modifying, or deleting sensitive documents.
Likely Case
Users with valid credentials could access API endpoints they shouldn't have access to, violating intended access controls and potentially exposing sensitive document data.
If Mitigated
With proper network segmentation and authentication controls, the impact is limited to authorized users gaining additional API access beyond what was intended.
🎯 Exploit Status
Exploitation requires valid user credentials and knowledge of API endpoints. The vulnerability is in the authentication bypass logic when API is disabled.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.8.6
Vendor Advisory: https://github.com/paperless-ngx/paperless-ngx/security/advisories/GHSA-72w4-hxqq-c256
Restart Required: Yes
Instructions:
1. Backup your Paperless-ngx instance and database. 2. Update to version 2.8.6 or later using your deployment method (Docker, manual install, etc.). 3. Restart the Paperless-ngx service. 4. Verify the fix by checking the version and testing API access with PAPERLESS_ENABLE_HTTP_API=false.
🔧 Temporary Workarounds
Disable API via network controls
linuxBlock API port access at firewall/load balancer level
# Example iptables rule to block API port (default 8000)
iptables -A INPUT -p tcp --dport 8000 -j DROP
Enable API with strict authentication
allKeep API enabled but implement strict authentication and access controls
# Set in paperless.conf or environment
PAPERLESS_ENABLE_HTTP_API=true
# Configure strong authentication methods
🧯 If You Can't Patch
- Implement network segmentation to restrict API endpoint access to trusted IPs only
- Enable detailed API access logging and monitor for unauthorized API usage patterns
🔍 How to Verify
Check if Vulnerable:
Check if running Paperless-ngx version 2.5.0-2.8.5 with PAPERLESS_ENABLE_HTTP_API=false, then test if authenticated users can access /api/ endpoints.
Check Version:
docker exec paperless-ngx python -c "import paperless; print(paperless.__version__)" or check web interface footer
Verify Fix Applied:
After updating to 2.8.6+, verify that with PAPERLESS_ENABLE_HTTP_API=false, API endpoints return proper 403/404 errors for authenticated users.
📡 Detection & Monitoring
Log Indicators:
- API access logs showing successful requests when PAPERLESS_ENABLE_HTTP_API=false
- Authentication logs showing users accessing /api/ endpoints
Network Indicators:
- HTTP requests to /api/* endpoints from authenticated sessions when API should be disabled
SIEM Query:
source="paperless-ngx" (path="/api/*" AND response_status=200) AND message="API disabled"
🔗 References
- https://github.com/paperless-ngx/paperless-ngx/commit/ed05b40ba461641b1b59b0a92f51f3f6a66ce180
- https://github.com/paperless-ngx/paperless-ngx/pull/6739
- https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.6
- https://github.com/paperless-ngx/paperless-ngx/security/advisories/GHSA-72w4-hxqq-c256
- https://github.com/paperless-ngx/paperless-ngx/commit/ed05b40ba461641b1b59b0a92f51f3f6a66ce180
- https://github.com/paperless-ngx/paperless-ngx/pull/6739
- https://github.com/paperless-ngx/paperless-ngx/releases/tag/v2.8.6
- https://github.com/paperless-ngx/paperless-ngx/security/advisories/GHSA-72w4-hxqq-c256