Skip to main content

Insecure service configuration - Header Checking

Description

The application disables the HeaderChecking property, which enables the encoding of newlines and carriage returns, thus allowing the injection of malicious headers

Impact

Ease header injection attacks through newlines and carriage returns

Recommendation

Set the EnableHeaderChecking property to true, of remove the line that sets the property in false, since its default value is true

Threat

Anonymoous attacker from the Internet

Expected Remediation Time

⌚ 20 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: H
  • Privileges required: N
  • User interaction: R
  • Scope: U
  • Confidentiality: N
  • Integrity: L
  • Availability: N

Temporal

  • Exploit code madurity: P
  • Remediation level: O
  • Report confidence: C

Result

  • Vector string: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N/E:P/RL:O/RC:C
  • Score:
    • Base: 3.1
    • Temporal: 2.8
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

The application correctly configures the EnableHeaderChecking

using System;
using System.Web.Configuration;

class TestClass {
public void TestMethod() {
HttpRuntimeSection httpRuntimeSection = new HttpRuntimeSection();
httpRuntimeSection.EnableHeaderChecking = true;
}
}

Non compliant code

The application has the EnableHeaderchecking disabled

using System;
using System.Web.Configuration;

class TestClass {
public void TestMethod() {
HttpRuntimeSection httpRuntimeSection = new HttpRuntimeSection();
httpRuntimeSection.EnableHeaderChecking = false;
}
}

Requirements