# CVE-2026-42874: Microdot: HTTP response splitting in Response.set_cookie()

- Severity: Low 3.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2026-05-05T18:35:20.000Z
- Modified: 2026-10-26T18:10:00.173Z
- Also known as: GHSA-7wc8-wvc4-m498, PYSEC-2026-2646
- Weaknesses: CWE-113
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- miguelgrinberg microdot: < 2.6.1
- microdot (PyPI): before 2.6.1

## Every score

- GitHub_M: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 3.7 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/miguelgrinberg/microdot/security/advisories/GHSA-7wc8-wvc4-m498> (web)
- <https://github.com/miguelgrinberg/microdot/commit/99b281b45faef8472410f2d56bfef496dfbd95d5> (web)
- <https://github.com/miguelgrinberg/microdot/blob/main/CHANGES.md> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42874> (advisory)
- <https://github.com/miguelgrinberg/microdot> (package)
- <https://pypi.org/project/microdot> (package)
- <https://github.com/advisories/GHSA-7wc8-wvc4-m498> (advisory)

## Sources

- CVE List: [CVE-2026-42874](https://www.cve.org/CVERecord?id=CVE-2026-42874), CVE Terms of Use, modified 2026-05-13
- GitHub Advisory Database: [GHSA-7wc8-wvc4-m498](https://github.com/advisories/GHSA-7wc8-wvc4-m498), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-42874](https://nvd.nist.gov/vuln/detail/CVE-2026-42874), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2646](https://osv.dev/vulnerability/PYSEC-2026-2646), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-42874 · Whole record: https://cve.day/CVE-2026-42874.json · Rebuilt by cve.day 2026-11-25T22:59:21.252Z
