{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-2099","id":"CVE-2025-2099","title":"Regular Expression Denial of Service (ReDoS) in huggingface/transformers","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","descriptionLong":"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-19T11:22:36.908Z","updated":"2026-10-28T02:30:22.858745996Z","reserved":"2025-03-07T17:39:16.856Z","status":"Analyzed","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.0","score":5.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"@huntr_ai"},{"version":"3.0","score":5.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"huntr.dev"},{"version":"3.0","score":5.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"OSV"},{"version":"3.0","score":5.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","rating":"medium","source":"GitHub"}],"rating":"high","products":["huggingface/transformers"],"affectedProducts":[{"vendor":"huggingface","product":"huggingface/transformers","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"4.50.0","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.50.0","<4.49.0"],"fixed":["4.50.0","4.49.0"],"advisory":"GHSA-qq3j-4f4f-9583"}],"cwes":["CWE-1333"],"aliases":["GHSA-qq3j-4f4f-9583","PYSEC-2025-40"],"references":[{"url":"https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4","tags":["Exploit","Third Party Advisory","web","evidence"]},{"url":"https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57","tags":["Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/2xxx/CVE-2025-2099.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-2099","tags":["advisory"]},{"url":"https://github.com/huggingface/transformers/pull/36648","tags":["web"]},{"url":"https://github.com/huggingface/transformers","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2025-40.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qq3j-4f4f-9583","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.00613,"epssPercentile":0.50163,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-2099","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-2099","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-2099","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-qq3j-4f4f-9583","ok":true,"note":"GHSA-qq3j-4f4f-9583"},{"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-2025-2099","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}