Define an explicit content type
Summary
All system files generated dynamically must have an explicitly defined content type.
Description
This configuration ensures that the appropriate content type is included in the HTTP response headers when the file is served. Programming languages may include code to set the content type based on the nature of the dynamically generated content. Additionally, web frameworks and libraries provide mechanisms for specifying content types in a clear way.
References
- CAPEC-242. Code injection
- OWASP10-A3. Injection
- OWASP10-A5. Security misconfiguration
- WASSEC-5_5. Extraction of dynamic content
- WASSEC-6_2_5_7. Information disclosure - Default web server files
- ASVS-11_1_4. Business logic security
- ASVS-12_3_4. File execution
- ASVS-12_5_2. File download
- ASVS-14_4_2. HTTP security headers
- OWASPAPI-API8. Security Misconfiguration
- CASA-11_1_4. Business Logic Security
Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan.If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.
Supported In
This requirement is verified in following services
Essential Plan
Advanced Plan