CVE-2023-54397

Description

A flaw was found in Tornado's HTTP request header parsing logic. When processing incoming HTTP requests, Tornado fails to reject malformed Content-Length headers containing non-standard characters. An unauthenticated remote attacker can exploit this parsing discrepancy when Tornado is deployed behind a front-end proxy or load balancer to cause a request boundary mismatch. This allows the attacker to conduct HTTP request smuggling, bypass proxy-level security controls, and inject unauthorized requests directly into the backend application context.

Statement

A vulnerability was found in Tornado's HTTP header parsing logic. When deployed behind a front-end reverse proxy or load balancer, Tornado improperly accepts non-standard characters in Content-Length headers instead of rejecting the malformed request. An unauthenticated remote attacker can exploit this parsing discrepancy to bypass proxy-level security validation, leading to HTTP request smuggling, unauthorized backend access, or request hijacking.

Mitigation

Configure upstream reverse proxies or load balancers to strictly normalize or sanitize HTTP headers and reject malformed Content-Length headers before requests reach the Tornado application layer.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.5N/A7.5
Attack VectorNetworkN/ANetwork
Attack ComplexityHighN/AHigh
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeChangedN/AChanged
ConfidentialityLowN/ALow
Integrity ImpactHighN/AHigh
Availability ImpactNoneN/ANone

Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N

cve.org: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N

Understanding the Weakness (CWE)

Integrity,Non-Repudiation,Access Control

Technical Impact: Unexpected State; Hide Activities; Bypass Protection Mechanism

An attacker could create HTTP messages to exploit a number of weaknesses including 1) the message can trick the web server to associate a URL with another URL's webpage and caching the contents of the webpage (web cache poisoning attack), 2) the message can be structured to bypass the firewall protection mechanisms and gain unauthorized access to a web application, and 3) the message can invoke a script or a page that returns client credentials (similar to a Cross Site Scripting attack).

Frequently Asked Questions

Want to get errata notifications? Sign up here.