043 – 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.
Supported In
Advanced: True
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
Last updated
2024/01/26