Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. urllib3
  4. ›
  5. CVE-2023-45803

CVE-2023-45803: urllib3's request body not stripped after redirect from 303 status changes request method to GET

October 17, 2023 (updated February 13, 2025)

urllib3 previously wouldn’t remove the HTTP request body when an HTTP redirect response using status 303 “See Other” after the request had its method changed from one that could accept a request body (like POST) to GET as is required by HTTP RFCs. Although the behavior of removing the request body is not specified in the section for redirects, it can be inferred by piecing together information from different sections and we have observed the behavior in other major HTTP client implementations like curl and web browsers.

From RFC 9110 Section 9.3.1:

A client SHOULD NOT generate content in a GET request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported.

References

  • github.com/advisories/GHSA-g4mx-q9vg-27p4
  • github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2023-212.yaml
  • github.com/urllib3/urllib3
  • github.com/urllib3/urllib3/commit/4e50fbc5db74e32cabd5ccc1ab81fc103adfe0b3
  • github.com/urllib3/urllib3/commit/4e98d57809dacab1cbe625fddeec1a290c478ea9
  • github.com/urllib3/urllib3/commit/b594c5ceaca38e1ac215f916538fb128e3526a36
  • github.com/urllib3/urllib3/releases/tag/1.26.18
  • github.com/urllib3/urllib3/releases/tag/2.0.7
  • github.com/urllib3/urllib3/security/advisories/GHSA-g4mx-q9vg-27p4
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4R2Y5XK3WALSR3FNAGN7JBYV2B343ZKB
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5F5CUBAN5XMEBVBZPHFITBLMJV5FIJJ5
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PPDPLM6UUMN55ESPQWJFLLIZY4ZKCNRX
  • nvd.nist.gov/vuln/detail/CVE-2023-45803
  • www.rfc-editor.org/rfc/rfc9110.html

Code Behaviors & Features

Detect and mitigate CVE-2023-45803 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.26.18, all versions starting from 2.0.0 before 2.0.7

Fixed versions

  • 2.0.7
  • 1.26.18

Solution

Upgrade to versions 1.26.18, 2.0.7 or above.

Impact 4.2 MEDIUM

CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

pypi/urllib3/CVE-2023-45803.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:54 +0000.