CVE-2026-42874: Microdot Microdot Has HTTP Response Splitting Vulnerability

LOW
Advisory Identifier: GHSA-7wc8-wvc4-m498
CVSS 3.7
CWE-113
Published
Advisory Summary

CVE-2026-42874 is a LOW (CVSS 3.7) microdot has http response splitting vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Microdot libraries in the PyPI ecosystem. The issue involves microdot has http response splitting in response.set_cookie(). Remediation is available by upgrading affected packages to version 2.6.1.

CVE-2026-42874 at a Glance

CVE Identifier CVE-2026-42874
GHSA Identifier GHSA-7wc8-wvc4-m498
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
Affected Product Microdot
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-42874

To remediate this vulnerability, upgrade all affected Microdot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

microdot fixed: 2.6.1
pip install microdot>=2.6.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show microdot

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-42874, inspect your installed packages using pip:

pip show microdot

Analyze the terminal output to locate any version of Microdot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.1), your application is affected.

Note: The pip show microdot command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In Microdot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The `Response.set_cookie()` method does not sanitize its string arguments, and in particular will not detect the presence of the `\r\n` sequence in them. This can be a potential source of header injection attacks. For a header injection attack through this issue to be possible, an attacker must first infiltrate the client (for example through an independent XSS attack), so that it can send malicious information that is destined to be stored in a cookie by the server on behalf of the victim. An attacker that infiltrates one client can only orchestrate a header injection attack for that client, all other clients that were not infiltrated are safe. ### Patches Upgrade to version 2.6.1. ### Workarounds Do not pass untrusted data to the `Response.set_cookie()` method.

CVE-2026-42874 Affected Microdot Versions

1 component(s)
Fixed Versions:
2.6.1
Product / Package Ecosystem Affected Versions Fixed Version
microdot
PyPI
< 2.6.1
2.6.1

References

Frequently Asked Questions

What is CVE-2026-42874?
CVE-2026-42874 is a security vulnerability in Microdot involving Microdot has HTTP response splitting in Response.set_cookie() under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting').
Which Microdot versions are affected?
Affected versions include releases prior to 2.6.1 across affected packages: microdot.
What version fixes CVE-2026-42874?
Upgrading to 2.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is microdot affected?
Yes, microdot is affected in releases prior to 2.6.1. Upgrade your dependency to 2.6.1 or later.
What is the CVSS score of CVE-2026-42874?
CVE-2026-42874 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-42874?
CVE-2026-42874 is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') (The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.).
How can I check PyPI dependencies for CVE-2026-42874?
Run the dependency tree command: 'pip show microdot'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7wc8-wvc4-m498",
  "modified" : "2026-05-13T14:18:28Z",
  "published" : "2026-05-05T18:35:20Z",
  "aliases" : [ "CVE-2026-42874" ],
  "summary" : "Microdot has HTTP response splitting in Response.set_cookie()",
  "details" : "### Impact\nThe `Response.set_cookie()` method does not sanitize its string arguments, and in particular will not detect the presence of the `\\r\\n` sequence in them. This can be a potential source of header injection attacks.\n\nFor a header injection attack through this issue to be possible, an attacker must first infiltrate the client (for example through an independent XSS attack), so that it can send malicious information that is destined to be stored in a cookie by the server on behalf of the victim. An attacker that infiltrates one client can only orchestrate a header injection attack for that client, all other clients that were not infiltrated are safe.\n\n### Patches\nUpgrade to version 2.6.1.\n\n### Workarounds\nDo not pass untrusted data to the `Response.set_cookie()` method.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "microdot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/miguelgrinberg/microdot/security/advisories/GHSA-7wc8-wvc4-m498"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42874"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/miguelgrinberg/microdot/commit/99b281b45faef8472410f2d56bfef496dfbd95d5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/miguelgrinberg/microdot"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/miguelgrinberg/microdot/blob/main/CHANGES.md"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-113" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-05T18:35:20Z",
    "nvd_published_at" : "2026-05-11T20:25:43Z"
  }
}