Skip to main content
InfoConfigOWASP A03:2021CWE-79

How to fix: Downloadable Content Served as inline

PDFs, Office documents, or other downloadable files are served with Content-Disposition: inline, causing them to render in the browser rather than download. Inline rendering exposes them to iframe-based data exfiltration.

Why it matters

An attacker who can embed your site in an iframe can extract text content from inline-rendered PDFs or documents via scroll-to-text-fragment attacks or timing side-channels.

Content-Disposition: inline tells the browser to render the file in the viewport. For sensitive documents, Content-Disposition: attachment forces a download instead, preventing browser rendering and reducing iframe-based exfiltration risk.

How to fix it

  1. 1Set Content-Disposition: attachment; filename="document.pdf" for sensitive downloads.
  2. 2Set Content-Disposition: inline only for content intended to render in the browser (e.g., images served in img tags).

Code examples

Next.js API route

TypeScript
return new Response(pdfBuffer, {
  headers: {
    'Content-Type': 'application/pdf',
    'Content-Disposition': 'attachment; filename="report.pdf"',
  },
});

References

Detected automatically by VulnRadar. The check id is content-disposition-inline, stable across every scan so you can filter or diff on it.

See every config check

Questions

How severe is Downloadable Content Served as inline?
VulnRadar rates this info severity in the config category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id content-disposition-inline, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Downloadable Content Served as inline map to?
It maps to CWE-79. In the OWASP Top 10 it falls under A03:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for downloadable content served as inline

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Downloadable Content Served as inline fix | VulnRadar