IDORSSRFAUTH BYPASSJWT FORGERYRACE CONDITIONXXEBROKEN OBJECT-LEVEL AUTHPRIVILEGE ESCALATIONMASS ASSIGNMENTGRAPHQL INTROSPECTION ABUSEIDORSSRFAUTH BYPASSJWT FORGERYRACE CONDITIONXXEBROKEN OBJECT-LEVEL AUTHPRIVILEGE ESCALATIONMASS ASSIGNMENTGRAPHQL INTROSPECTION ABUSE
Impactr Logoimpactr
FeaturesHow it worksEvidencePricingLearnCompare
  1. Home
  2. HTTP Security Headers
  3. Content-Disposition

HTTP security header

Content-Disposition

The Content-Disposition header can instruct the browser to download a response as an attachment rather than rendering it inline. For user-supplied or untrusted files, forcing download (with a safe filename) reduces the risk of the browser interpreting the content as HTML or script.

Example

Content-Disposition: attachment; filename="report.pdf"

Configuration guidance

  • Serve untrusted downloads as attachments, not inline.
  • Sanitize filenames and pair with X-Content-Type-Options: nosniff.

Helps mitigate

Cross-Site Scripting (XSS)

Related headers

X-Content-Type-Options
MDN: Content-Disposition

Impactr checks security-header configuration as part of testing your web apps and APIs the way an attacker would - and proves what a missing header actually exposes.

Test my app
← All security headers
Impactr Logoimpactr

Built by hackers, for the code you ship. Autonomous AI penetration testing for modern web apps and APIs.

© 2026 Impactr

Product

FeaturesCoverageUse casesEvidencePricingWaitlist

Resources

VulnerabilitiesGuidesComparisonsGlossaryCWE databaseBy industryBy languageHTTP status codesSecurity headers

Company

ContactTwitterLinkedInGitHub