CVE-2026-42874 Details
Description
Microdot is a minimalistic Python web framework. Prior to 2.6.1, 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. This vulnerability is fixed in 2.6.1.
A header injection vulnerability has been identified in the Microdot web framework, affecting versions prior to 2.6.1. The issue arises in the Response.set_cookie() method, which fails to properly sanitize string inputs, allowing the inclusion of carriage return and newline sequences. This flaw can lead to header injection attacks. Exploitation requires an attacker to first compromise the client, potentially through cross-site scripting (XSS), to send malicious data that the server will store in a cookie for the victim. The vulnerability only affects the compromised client.
Users are advised to upgrade to Microdot version 2.6.1 or later, and to avoid passing untrusted data to the Response.set_cookie() method.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 11, 2026CISA-ADP
Assessed May 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/miguelgrinberg/microdot/blob/main/CHANGES.md | [email protected] | Release NotesVendor |
| https://github.com/miguelgrinberg/microdot/commit/99b281b45faef8472410f2d56bfef496dfbd95d5 | [email protected] | Source CodeVendor |
| https://github.com/miguelgrinberg/microdot/security/advisories/GHSA-7wc8-wvc4-m498 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-113 | Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Microdot | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 11, 2026 | New CVE Received | [email protected] |
Volerion