Rule Definition
When Header checking attribute is disabled, there are chances for an attacker to perform header manipulation attacks. The .NET framework by default prevents sending new line characters to APIs which set HTTP header values. But this can be disabled by setting the EnableHeaderChecking property on the HttpRuntimeSection object to false.
Remediation
Set the EnableHeaderChecking flag to true
Violation Code Sample
Sample in config file
<system.web>
<httpRuntime targetFramework="4.6.1" enableHeaderChecking="false"/>
</system.web>
Fixed Code Sample
<system.web>
<httpRuntime targetFramework="4.6.1" enableHeaderChecking="false"/>
</system.web>
//Or - as by default it is true
<system.web>
<httpRuntime targetFramework="4.6.1"/>
</system.web>
Reference
CWE-113 - https://cwe.mitre.org/data/definitions/113.html
OWASP Top 10 2004: A10-Insecure Configuration Management
OWASP Top 10 2010: A6-Security Misconfiguration
OWASP Top 10 2013: A5-Security Misconfiguration
OWASP Top 10 2017: A6-Security Misconfiguration
https://www.owasp.org/index.php/Top_10-2017_A6-Security_Misconfiguration
Related Technologies
Technical Criterion
Secure Coding - Weak Security Features
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.