{"id":"CVE-2020-5236","aliases":["CVE-2020-5236","GHSA-73m2-3pwg-5fgc","PYSEC-2020-155"],"related":[],"kind":"vulnerability","state":"published","title":"Catastrophic backtracking in regex allows Denial of Service in Waitress","summary":"Waitress version 1.4.2 allows a DOS attack When waitress receives a header that contains invalid characters. When a header like \"Bad-header: xxxxxxxxxxxxxxx\\x10\" is received, it will cause the regular expression engine to catastrophically backtrack causing the process to use 100% CPU time and blocking any other interactions. This allows an attacker to send a single request with an invalid header and take the service offline. This issue was introduced in version 1.4.2 when the regular expression was updated to attempt to match the behaviour required by errata associated with RFC7230. The regular expression that is used to validate incoming headers has been updated in version 1.4.3, it is recommended that people upgrade to the new version of Waitress as soon as possible.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Waitress version 1.4.2 allows a DOS attack When waitress receives a header that contains invalid characters. When a header like \"Bad-header: xxxxxxxxxxxxxxx\\x10\" is received, it will cause the regular expression engine to catastrophically backtrack causing the process to use 100% CPU time and blocking any other interactions. This allows an attacker to send a single request with an invalid header and take the service offline. This issue was introduced in version 1.4.2 when the regular expression was updated to attempt to match the behaviour required by errata associated with RFC7230. The regular expression that is used to validate incoming headers has been updated in version 1.4.3, it is recommended that people upgrade to the new version of Waitress as soon as possible.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen waitress receives a header that contains invalid characters it will cause the regular expression engine to catastrophically backtrack causing the process to use 100% CPU time and blocking any other interactions.\n\nThis would allow an attacker to send a single request with an invalid header and take the service offline.\n\nInvalid header example:\n\n```\nBad-header: xxxxxxxxxxxxxxx\\x10\n```\n\nIncreasing the number of `x`'s in the header will increase the amount of time Waitress spends in the regular expression engine.\n\nThis issue was introduced in version 1.4.2 when the regular expression was updated to attempt to match the behaviour required by errata associated with RFC7230.\n\n### Patches\n\nThe regular expression that is used to validate incoming headers has been updated in version 1.4.3, it is recommended that people upgrade to the new version of Waitress as soon as possible.\n\n### Workarounds\n\nIf you have deployed a reverse proxy in front of Waitress it may already be rejecting requests that include invalid headers.\n\n### Thanks\n\nThe Pylons Project would like to thank [Fil Zembowicz](https://github.com/fzembow) for reaching out and disclosing this vulnerability!\n\n### References\n\nCatastrophic backtracking explained: https://www.regular-expressions.info/catastrophic.html\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- open an issue at https://github.com/Pylons/waitress/issues (if not sensitive or security related)\n- email the Pylons Security mailing list: pylons-project-security@googlegroups.com (if security related)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Waitress versión 1.4.2, permite un ataque de DOS cuando waitress recibe un encabezado que contiene caracteres no válidos. Cuando un encabezado como \"Bad-header: xxxxxxxxxxxxxxx\\x10\" es recibido, causará que el motor de expresión regular retroceda catastróficamente, provocando que el proceso utilice el 100% del tiempo de CPU y bloquee cualquier otras interacciones. Esto permite a un atacante enviar una única petición con un encabezado no válido y desconectar el servicio. Este problema fue introducido en la versión 1.4.2 cuando se actualizó la expresión regular para intentar hacer coincidir el comportamiento requerido por las erratas asociadas con RFC7230. La expresión regular que se usa para comprobar los encabezados entrantes se actualizó en la versión 1.4.3, se recomienda que las personas actualicen a la nueva versión de Waitress tan pronto como sea posible.","source":"nvd"}],"published":"2020-02-04T03:05:14.000Z","modified":"2026-09-10T03:49:25.209Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","score":5.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","score":5.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H","score":5.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:N/I:N/A:C","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"= 1.4.2","status":"affected"}],"vendor":"Pylons","product":"Waitress","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.4.2","status":"affected","fixed":"1.4.3"}],"ecosystem":"PyPI","package":"waitress","purl":"pkg:pypi/waitress","source":"ghsa"},{"ranges":[{"status":"affected","version":"1.4.2"}],"vendor":"agendaless","product":"waitress","cpe":"cpe:2.3:a:agendaless:waitress:1.4.2:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"6e46f9e3f014d64dd7d1e258eaf626e39870ee1f"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.4.3"}],"ecosystem":"PyPI","package":"waitress","purl":"pkg:pypi/waitress","repo":"https://github.com/Pylons/waitress","source":"pysec"}],"references":[{"url":"https://github.com/Pylons/waitress/security/advisories/GHSA-73m2-3pwg-5fgc","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Pylons/waitress/commit/6e46f9e3f014d64dd7d1e258eaf626e39870ee1f","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5236","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Pylons/waitress","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/waitress/PYSEC-2020-155.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-5236","url":"https://www.cve.org/CVERecord?id=CVE-2020-5236","licence":"CVE Terms of Use","modified":"2024-08-04T08:22:09.008Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-73m2-3pwg-5fgc","url":"https://github.com/advisories/GHSA-73m2-3pwg-5fgc","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:25.209Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-5236","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5236","licence":"Public domain","modified":"2026-06-17T03:21:05.140Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-155","url":"https://osv.dev/vulnerability/PYSEC-2020-155","licence":"CC-BY-4.0","modified":"2023-11-08T04:03:52.479Z"}],"updatedAt":"2026-11-25T22:57:50.743Z","epss":{"score":0.02363,"percentile":0.84265,"date":"2026-12-02T12:00:21.000Z"}}