{"id":"CVE-2025-2099","url":"https://www.cyber-defence.io/tools/cve/CVE-2025-2099","generatedAt":"2026-10-27T23:58:20.781Z","title":"A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a Regular Expression Denial of Service (ReDoS) attack.","description":"A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a Regular Expression Denial of Service (ReDoS) attack. The regular expression used to process code blocks in docstrings contains nested quantifiers, leading to exponential backtracking when processing input with a large number of newline characters. An attacker can exploit this by providing a specially crafted payload, causing high CPU usage and potential application downtime, effectively resulting in a Denial of Service (DoS) scenario.","published":"2025-05-19T12:15:20.000Z","lastModified":"2026-06-17T09:06:20.000Z","status":"Analyzed","sourceIdentifier":"security@huntr.dev","cvss":{"version":"3.1","score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"cwe":["CWE-1333"],"affected":["huggingface/transformers"],"epss":{"score":0.00608,"percentile":0.48779,"date":"2026-10-26","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"high","text":"High impact if exploited, but EPSS currently rates exploitation as unlikely (0.61%). Schedule it in the normal patch cycle and watch for a rise in EPSS or a public exploit."},"changes":[],"references":[{"url":"https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57","tags":["Patch"],"source":"security@huntr.dev"},{"url":"https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4","tags":["Exploit","Third Party Advisory"],"source":"security@huntr.dev"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-2099","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}