CSP Exfiltration Analysis

Analysis of browser-based data exfiltration vectors and how CSP and VPE address each one.

Risk profile
Risk: high · Difficulty: advanced · 20 min
No tool guarantees anonymity. Review the “What this does not protect” section before acting.

CSP Exfiltration Analysis

This document analyzes browser-based data exfiltration vectors relevant to client-side PDF processing. Each vector is assessed for risk (1-100) and the mitigation applied by PDF Changer's VPE.

CSP-blocked vectors

These are fully blocked by the Content Security Policy applied inside the VPE sandbox:

VectorRiskMitigation
fetch() to external server95connect-src 'none'
XMLHttpRequest95connect-src 'none'
WebSocket connection90connect-src 'none'
navigator.sendBeacon()85connect-src 'none'
Image pixel beacon (new Image())80img-src 'none'
Dynamic script injection80script-src 'unsafe-inline' (no external)
CSS background-image URL70style-src 'none'
FontFace URL loading65font-src 'none'
Form submission to external URL60form-action 'none'
EventSource (SSE)55connect-src 'none'
iframe navigation50frame-src 'none' + sandbox
SVG foreignObject with external ref45img-src 'none'
XSLT with external document()40default-src 'none'
Prefetch/preconnect link elements35default-src 'none'

Separately mitigated vectors

These bypass CSP but are addressed by other VPE mechanisms:

VectorRiskMitigation
WebRTC ICE candidate leakage90RTCPeerConnection monkey-patched to undefined
WebRTC ufrag/password data encoding85Same monkey-patch
DNS prefetch subdomain encoding75X-DNS-Prefetch-Control: off header
DOM element injection (tracking pixel)70MutationObserver detects all suspicious elements
Dynamic link rel="dns-prefetch"60We control all HTML; no dynamic injection possible

Cannot-block vectors

These cannot be mitigated by any in-browser mechanism:

VectorRiskWhy
Browser extensions with host permissions95Extensions bypass CSP entirely, can read DOM and intercept requests
OS-level network monitoring85Operating system sees all traffic regardless of browser sandbox
Spectre-class side-channel attacks70Full mitigation is impossible in software (per Chromium Security Team)
Hardware keyloggers or screen capture65Physical access defeats all software protections
Compromised browser binary60Modified browser can ignore all security policies
DNS-over-HTTPS resolver logging40DoH resolver sees query patterns regardless of browser behavior

Research references

  • Steffens, Stock, Johns. "Data Exfiltration in the Face of CSP." ACM AsiaCCS 2016. Proved DNS prefetch bypasses the strictest CSP configurations.
  • Chromium Security Team. Post-Spectre Threat Model. States that "full Spectre mitigation is impossible in software."
  • W3C CSP Working Group. Issue #92. WebRTC exfiltration acknowledged in 2016; no fix implemented.
  • CVE-2020-6519. Chrome CSP bypass via javascript: URI bookmarks.
  • Chen, Gorbaty, Singhal, Jackson. "Self-Exfiltration: The Dangers of Browser-Enforced IFC." IEEE W2SP 2012.

What this does not protect

This analysis covers browser-level vectors only. It does not address OS-level monitoring, hardware-level attacks, or compromised browser binaries. See the residual risk disclosure for those vectors.

Methodology

Each vector was tested against:

  1. A strict CSP with default-src 'none' and no connect-src allowlist
  2. A sandboxed iframe without allow-same-origin
  3. The combination of both (PDF Changer's approach)

Risk scores reflect the vector's potential impact if unmitigated, considering data bandwidth, detectability, and reliability. They are not CVSS scores.

Next safe step: scrub a PDF locally, open FAQ Hub, and review defensive-only policy.