BentoPDF: SSRF via DNS Rebinding (TOCTOU) in Cloudflare CORS Proxy Worker
What fixes it
No source in this snapshot names a fixed version. The vendor advisories under References are the place to check.
Description
BentoPDF is a privacy-focused PDF toolkit that runs in the browser. In versions through 2.8.6, cloudflare/cors-proxy-worker.js performs a DNS-over-HTTPS safety check in hostnameResolvesToPrivate(), as used by isValidCertificateUrl() and isValidTsaUrl(), separately from the outbound fetch(targetUrl, ...). In deployments where PROXY_SECRET validation is not enabled, a direct client that controls authoritative DNS can forge the Origin header, supply a certificate, OCSP, CRL, or TSA URL that passes the proxy's accepted path checks, return a public address during validation, and return a private or link-local address during the later fetch. The endpoint can return allowed response bodies to the attacker, but exploitation requires precise timing, redirects and IP-literal obfuscation are blocked, and network reachability limits the target. This vulnerability is fixed in 2.8.7.
Text from CVE List
Affected versions 2
- bentopdfaffected: < 2.8.7CVE List
- bentopdf and bentopdf-simple, docker<= 2.8.6GitHub
References 4
- github.com/alam00000/bentopdf/commit/45496fcd2ed6e02dcdde0d3839cc5024c091760cFixvia CVE List
- github.com/alam00000/bentopdf/commit/58cd1a8893bfe06e4a59a72adc2e7db00a8b9266Fixvia CVE List
- github.com/alam00000/bentopdf/releases/tag/v2.8.7Fixvia CVE List
- github.com/alam00000/bentopdf/security/advisories/GHSA-wh78-rcw2-hhg9Advisoryvia CVE List