# CVE-2026-91991: Tornado cookie attribute injection via capitalized kwargs

Source: https://junglewise.ai/threats/cve-2026-91991-tornado-cookie-attribute-injection-via-capitalized-kwargs  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-15. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-91991 · Severity: medium · CVSS 5.4 · Published 2026-09-15

Tornado is a popular Python web framework used to build web applications and APIs. The framework's set_cookie function contains an incomplete security fix that allows attackers to inject malicious cookie attributes by using capitalized parameter names. An attacker could exploit this to modify cookie security settings—such as forcing cookies to be transmitted over unencrypted connections or changing the cookie's domain—potentially leading to session hijacking or credential theft.

Technologies: [tornado (PyPI)](https://junglewise.ai/threats/technologies/tornado). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-91991 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-91991 being exploited in the wild.

**How severe is CVE-2026-91991?** Medium severity, with a CVSS score of 5.4, published 15 September 2026.

**Which products and versions are affected?** tornado (PyPI) ECOSYSTEM:introduced=6.5.5,fixed=6.5.8.

**Is there a fix for CVE-2026-91991?** Yes. tornado (PyPI): upgrade to 6.5.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-91991 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-91991?** Check whether you run tornado (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tornado (PyPI): upgrade to 6.5.8 or later

  ```sh
  pip install "tornado>=6.5.8"
  ```


## Technical details

This vulnerability is a bypass of CVE-2026-35536's incomplete patch. The original fix added validation to reject characters [\x00-\x20\x3b\x7f] in the hardcoded lowercase parameter names (name, domain, path, samesite), but the deprecated **kwargs code path bypasses this validation. Because Morsel.__setitem__ is case-insensitive, capitalized kwargs like Domain=, Path=, or SameSite= route to the same reserved attributes without character validation, allowing semicolon-delimited injection (e.g., Domain="evil.com; Secure; SameSite=None"). The vulnerability is network-reachable and requires no authentication or user interaction—only that an application uses capitalized keyword arguments to set_cookie. The fix involves applying the same character validation to all **kwargs entries.

## Affected products

- Tornado Tornado 6.5.5 through before 6.5.8

## Identifiers

- CVE-2026-91991
- GHSA-wwv5-g3v4-889x

## Timeline

- 2026-08-07: disclosed: GitHub Security Advisory GHSA-wwv5-g3v4-889x published
- 2026-09-15: advisory: CVE-2026-91991 assigned

## References

- [https://github.com/tornadoweb/tornado/security/advisories/GHSA-wwv5-g3v4-889x](https://github.com/tornadoweb/tornado/security/advisories/GHSA-wwv5-g3v4-889x)
- [https://www.vulncheck.com/advisories/tornado-before-6.5.8-cookie-attribute-injection-via-capitalized-kwargs](https://www.vulncheck.com/advisories/tornado-before-6.5.8-cookie-attribute-injection-via-capitalized-kwargs)

## Related threats

- [Tornado open redirect in RedirectHandler URL templates](https://junglewise.ai/threats/cve-2026-116578-tornado-is-a-python-web-framework-and-asynchronous-networking)
- [Tornado HTTP header parser quadratic CPU consumption via line folding](https://junglewise.ai/threats/cve-2026-116577-tornado-is-a-python-web-framework-and-asynchronous-networking)
- [Tornado HTTP/1.1 chunked encoding denial of service](https://junglewise.ai/threats/cve-2026-115927-tornado-is-a-python-web-framework-and-asynchronous-networking)
- [Tornado StaticFileHandler path traversal via symlinks](https://junglewise.ai/threats/cve-2026-103263-tornado-staticfilehandler-follows-symlinks-outside-static-root)
- [Tornado CurlAsyncHTTPClient unbounded memory accumulation in decompression](https://junglewise.ai/threats/cve-2026-103262-tornado-curlasynchttpclient-enforces-no-response-size-limit)
