{"id":"CVE-2023-54397","aliases":["CVE-2023-54397","GHSA-qppv-j76h-2rpx"],"related":[],"kind":"vulnerability","state":"published","title":"Tornado before 6.3.3 HTTP Request Smuggling via Content-Length","summary":"Tornado before 6.3.3 contains an HTTP request smuggling vulnerability due to improper parsing of Content-Length headers accepting non-standard characters. Attackers can send crafted HTTP requests with these characters to bypass proxy validation and smuggle requests when deployed behind certain proxies.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Tornado before 6.3.3 contains an HTTP request smuggling vulnerability due to improper parsing of Content-Length headers accepting non-standard characters. Attackers can send crafted HTTP requests with these characters to bypass proxy validation and smuggle requests when deployed behind certain proxies.","source":"cvelist"},{"lang":"en","text":"## Summary\nTornado interprets `-`, `+`, and `_` in chunk length and `Content-Length` values, which are not allowed by the HTTP RFCs. This can result in request smuggling when Tornado is deployed behind certain proxies that interpret those non-standard characters differently. This is known to apply to older versions of haproxy, although the current release is not affected.\n\n## Details\nTornado uses the `int` constructor to parse the values of `Content-Length` headers and chunk lengths in the following locations:\n### `tornado/http1connection.py:445`\n```python3\n            self._expected_content_remaining = int(headers[\"Content-Length\"])\n```\n### `tornado/http1connection.py:621`\n```python3\n                content_length = int(headers[\"Content-Length\"])  # type: Optional[int]\n```\n### `tornado/http1connection.py:671`\n```python3\n            chunk_len = int(chunk_len_str.strip(), 16)\n```\nBecause `int(\"0_0\") == int(\"+0\") == int(\"-0\") == int(\"0\")`, using the `int` constructor to parse and validate strings that should contain only ASCII digits is not a good strategy.","format":"markdown","source":"ghsa"}],"published":"2023-08-14T21:34:17.000Z","modified":"2026-09-17T15:16:39.103Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N","score":9,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N","score":9,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-444"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"6.3.3","status":"affected"},{"type":"semver","version":"6.3.3","status":"unaffected"}],"vendor":"tornadoweb","product":"tornado","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.3.3"}],"ecosystem":"PyPI","package":"tornado","purl":"pkg:pypi/tornado","source":"ghsa"}],"references":[{"url":"https://github.com/tornadoweb/tornado/security/advisories/GHSA-qppv-j76h-2rpx","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/tornado-before-6.3.3-http-request-smuggling-via-content-length","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/tornadoweb/tornado/commit/b7a5dd29bb02950303ae96055082c12a1ea0a4fe","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/tornadoweb/tornado","tags":["package"],"sources":["ghsa"]}],"credits":["kenballus"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-17T14:48:39.262Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-54397","url":"https://www.cve.org/CVERecord?id=CVE-2023-54397","licence":"CVE Terms of Use","modified":"2026-09-17T14:48:55.089Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qppv-j76h-2rpx","url":"https://github.com/advisories/GHSA-qppv-j76h-2rpx","licence":"CC-BY-4.0","modified":"2026-09-16T03:56:01.387Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-54397","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-54397","licence":"Public domain","modified":"2026-09-17T15:16:39.103Z"}],"updatedAt":"2026-11-25T22:58:35.432Z","epss":{"score":0.00377,"percentile":0.33789,"date":"2026-12-01T12:00:22.000Z"}}