Description
HTTPX2 is a next generation HTTP client for Python. Prior to 2.11.0, FileField.render_headers() in src/httpx2/httpx2/_multipart.py directly interpolates attacker-controlled content_type values and custom headers from the files= three-element (filename, content, content_type) tuple and the files= four-element (filename, content, content_type, headers) tuple into multipart/form-data part headers without validating header names or values. CR or LF characters can terminate a part header, inject additional part headers, or end the part header block early, allowing a downstream multipart parser to treat attacker-supplied lines as genuine headers and potentially alter part semantics or bypass header-based checks. This issue is fixed in version 2.11.0.
Published: 2026-09-02
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

HTTPX2 FileField.render_headers() concatenates the content_type and any custom headers supplied in the files tuple directly into multipart/form-data part headers without validation; this is a header injection vulnerability (CWE-93). An attacker can inject CR or LF characters to prematurely terminate a header, insert additional headers, or close the header block early. This manipulation can lead a downstream parser to treat attacker‑supplied lines as legitimate headers, thereby altering request semantics and potentially bypassing header‑based checks. The vulnerability does not provide direct code execution but enables the attacker to change how the server interprets the request, which could be used to redirect traffic, trigger unintended behavior, or facilitate other attacks.

Affected Systems

The library pydantic:httpx2, in all releases prior to v2.11.0, is affected. The vulnerability resides in the FileField.render_headers() function used by applications that construct multipart/form-data requests containing file uploads. Any deployment of httpx2 older than v2.11.0 that passes unsanitized content_type or custom header values to the files parameter is at risk.

Risk and Exploitability

The CVSS score of 5.3 classifies the issue as moderate severity. An EPSS score is not available, and it is not listed in CISA’s KEV catalog. The attack requires the ability to craft multipart/form‑data requests with injectable content_type or custom headers, which is typically available to an application that uses HTTPX2 to send outgoing requests. Exploitation could allow an attacker to manipulate downstream request handling by adding or altering headers, potentially leading to bypass of security controls or request smuggling.

Generated by OpenCVE AI on September 3, 2026 at 10:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade HTTPX2 to version 2.11.0 or later.
  • Validate any file upload parameters and explicitly strip or reject CR and LF characters from content_type and custom header values before they are passed to the library.
  • If an immediate upgrade is not possible, temporarily disable the use of custom headers in the files parameter and rely on the library’s default header generation until the update can be applied.

Generated by OpenCVE AI on September 3, 2026 at 10:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 03 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
First Time appeared Pydantic
Pydantic httpx2
Vendors & Products Pydantic
Pydantic httpx2

Thu, 03 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Wed, 02 Sep 2026 18:00:00 +0000

Type Values Removed Values Added
Description HTTPX2 is a next generation HTTP client for Python. Prior to 2.11.0, FileField.render_headers() in src/httpx2/httpx2/_multipart.py directly interpolates attacker-controlled content_type values and custom headers from the files= three-element (filename, content, content_type) tuple and the files= four-element (filename, content, content_type, headers) tuple into multipart/form-data part headers without validating header names or values. CR or LF characters can terminate a part header, inject additional part headers, or end the part header block early, allowing a downstream multipart parser to treat attacker-supplied lines as genuine headers and potentially alter part semantics or bypass header-based checks. This issue is fixed in version 2.11.0.
Title HTTPX2: Multipart part header injection via unvalidated file Content-Type and custom headers
Weaknesses CWE-93
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-02T18:20:46.599Z

Reserved: 2026-09-01T16:27:58.130Z

Link: CVE-2026-84379

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-02T18:21:29.300

Modified: 2026-09-02T19:18:08.010

Link: CVE-2026-84379

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-02T17:57:17Z

Links: CVE-2026-84379 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-03T15:34:00Z

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')