{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-85999","id":"CVE-2026-85999","title":"Soup Sieve: Polynomial-time ReDoS (O(n²)) in the whitespace/comment trimming regex `RE_WS_END` (triggers on VALID selectors)","description":"Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, selector_iter in src/soupsieve/css_parser.py trims the raw selector with RE_WS_END, an end-anchored WSC whitespace-and-comment expression used with search(), so the regular expression engine retries a greedy scan at every starting offset. An attacker-controlled valid selector containing a long internal wh","descriptionLong":"Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, selector_iter in src/soupsieve/css_parser.py trims the raw selector with RE_WS_END, an end-anchored WSC whitespace-and-comment expression used with search(), so the regular expression engine retries a greedy scan at every starting offset. An attacker-controlled valid selector containing a long internal whitespace run, or a selector containing a long CSS comment run followed by another token, causes quadratic CPU work before tokenization. User-controlled selectors can reach the path through soupsieve.compile() and BeautifulSoup.select(), while applications using only hard-coded selectors are unaffected. This root cause is separate from the IDENTIFIER and VALUE backtracking vulnerability because the cost occurs in RE_WS_END.search during trimming rather than token matching. The resulting CPU consumption can hold the Python GIL, exhaust workers, and stall a service without causing memory corruption or code execution. The issue is fixed in version 2.9.","published":"2026-09-17T15:23:37.457Z","updated":"2026-11-10T20:42:19.450903263Z","reserved":"2026-09-04T19:17:36.246Z","status":"Awaiting Analysis","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"github.com"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"OSV"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"GitHub"}],"rating":"medium","products":["facelessuser soupsieve"],"affectedProducts":[{"vendor":"facelessuser","product":"soupsieve","defaultStatus":null,"versions":[{"version":"< 2.9","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"soupsieve","purl":"pkg:pypi/soupsieve","ranges":["<2.9.0"],"fixed":["2.9.0"],"advisory":"GHSA-j934-xhv5-fg8f"}],"cwes":["CWE-400","CWE-1333"],"aliases":["GHSA-j934-xhv5-fg8f","PYSEC-2026-4171"],"references":[{"url":"https://github.com/facelessuser/soupsieve/security/advisories/GHSA-j934-xhv5-fg8f","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/facelessuser/soupsieve/commit/cf198fcddc9230f06ed39f974eba0ce076b85cda","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/facelessuser/soupsieve/releases/tag/2.9","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/85xxx/CVE-2026-85999.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85999","tags":["advisory"]},{"url":"https://github.com/facelessuser/soupsieve","tags":["package"]},{"url":"https://pypi.org/project/soupsieve","tags":["package"]},{"url":"https://github.com/advisories/GHSA-j934-xhv5-fg8f","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.00609,"epssPercentile":0.49968,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-85999","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85999","ok":true,"note":"Awaiting Analysis"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-85999","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-j934-xhv5-fg8f","ok":true,"note":"GHSA-j934-xhv5-fg8f"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-85999","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}