Host Header Injection

medium Web App Scanning Plugin ID 98623

Language:

Synopsis

Host Header Injection

Description

When creating URI for links in web applications, developers often resort to the HTTP Host header available in HTTP request sent by client side. A remote attacker can exploit this by sending a fake header with a domain name under his control allowing him to poison web-cache or password reset emails for example.

Solution

Web application should not trust Host and X-Forwarded-Host and should use a secure SERVER_NAME instead of these headers.

See Also

https://fr.slideshare.net/DefconRussia/http-host-header-attacks

https://www.linkedin.com/pulse/host-header-injection-depth-utkarsh-tiwari/

https://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html

Plugin Details

Severity: Medium

ID: 98623

Type: remote

Family: Injection

Published: 6/25/2019

Updated: 5/18/2022

Scan Template: api, full, pci, scan

Risk Information

VPR

Risk Factor: Low

Score: 2.9

CVSS v2

Risk Factor: Medium

Base Score: 5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N

CVSS Score Source: Tenable

CVSS v3

Risk Factor: Medium

Base Score: 4.3

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

CVSS Score Source: Tenable

Reference Information

CWE: 20

OWASP: 2010-A4, 2013-A4, 2017-A5, 2021-A3

WASC: Improper Input Handling

CAPEC: 10, 101, 104, 108, 109, 110, 120, 13, 135, 136, 14, 153, 182, 209, 22, 23, 230, 231, 24, 250, 261, 267, 28, 3, 31, 42, 43, 45, 46, 47, 473, 52, 53, 588, 63, 64, 67, 7, 71, 72, 73, 78, 79, 8, 80, 81, 83, 85, 88, 9

DISA STIG: APSC-DV-002560

HIPAA: 164.306(a)(1), 164.306(a)(2)

ISO: 27001-A.14.2.5

NIST: sp800_53-SI-10

OWASP API: 2019-API7

OWASP ASVS: 4.0.2-5.1.3

PCI-DSS: 3.2-6.5