{"id":"CVE-2026-42874","aliases":["CVE-2026-42874","GHSA-7wc8-wvc4-m498","PYSEC-2026-2646"],"related":[],"kind":"vulnerability","state":"published","title":"Microdot: HTTP response splitting in Response.set_cookie()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Microdot es un framework web minimalista de Python. Antes de la versión 2.6.1, el método Response.set_cookie() no sanea sus argumentos de cadena, y en particular no detectará la presencia de la secuencia \\r\\n en ellos. Esto puede ser una fuente potencial de ataques de inyección de encabezado. Para que un ataque de inyección de encabezado a través de este problema sea posible, un atacante debe primero infiltrar al cliente (por ejemplo, a través de un ataque XSS independiente), para que este pueda enviar información maliciosa que está destinada a ser almacenada en una cookie por el servidor en nombre de la víctima. Un atacante que infiltra a un cliente solo puede orquestar un ataque de inyección de encabezado para ese cliente; todos los demás clientes que no fueron infiltrados están seguros. Esta vulnerabilidad está corregida en la versión 2.6.1.","source":"nvd"}],"published":"2026-05-05T18:35:20.000Z","modified":"2026-10-26T18:10:00.173Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N","score":3.7,"rating":"LOW"}],"cwes":["CWE-113"],"affected":[{"ranges":[{"version":"< 2.6.1","status":"affected"}],"vendor":"miguelgrinberg","product":"microdot","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.1"}],"ecosystem":"PyPI","package":"microdot","purl":"pkg:pypi/microdot","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.6.1"}],"ecosystem":"PyPI","package":"microdot","purl":"pkg:pypi/microdot","source":"pysec"}],"references":[{"url":"https://github.com/miguelgrinberg/microdot/security/advisories/GHSA-7wc8-wvc4-m498","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/miguelgrinberg/microdot/commit/99b281b45faef8472410f2d56bfef496dfbd95d5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/miguelgrinberg/microdot/blob/main/CHANGES.md","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42874","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/miguelgrinberg/microdot","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/microdot","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-7wc8-wvc4-m498","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-13T13:07:06.806Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42874","url":"https://www.cve.org/CVERecord?id=CVE-2026-42874","licence":"CVE Terms of Use","modified":"2026-05-13T14:40:42.606Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7wc8-wvc4-m498","url":"https://github.com/advisories/GHSA-7wc8-wvc4-m498","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:25.193Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42874","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42874","licence":"Public domain","modified":"2026-10-26T18:10:00.173Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2646","url":"https://osv.dev/vulnerability/PYSEC-2026-2646","licence":"CC-BY-4.0","modified":"2026-07-13T16:31:50.940Z"}],"updatedAt":"2026-11-25T22:59:21.252Z","epss":{"score":0.00215,"percentile":0.12693,"date":"2026-12-01T12:00:22.000Z"}}