ghsa-qq3j-4f4f-9583
Vulnerability from github
Published
2025-05-19 12:30
Modified
2025-05-22 17:42
Severity ?
Summary
Hugging Face Transformers Regular Expression Denial of Service
Details
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.
{ "affected": [ { "package": { "ecosystem": "PyPI", "name": "transformers" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "4.50.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-2099" ], "database_specific": { "cwe_ids": [ "CWE-1333" ], "github_reviewed": true, "github_reviewed_at": "2025-05-19T21:53:36Z", "nvd_published_at": "2025-05-19T12:15:19Z", "severity": "MODERATE" }, "details": "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.", "id": "GHSA-qq3j-4f4f-9583", "modified": "2025-05-22T17:42:18Z", "published": "2025-05-19T12:30:33Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2099" }, { "type": "WEB", "url": "https://github.com/huggingface/transformers/pull/36648" }, { "type": "WEB", "url": "https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57" }, { "type": "PACKAGE", "url": "https://github.com/huggingface/transformers" }, { "type": "WEB", "url": "https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2025-40.yaml" }, { "type": "WEB", "url": "https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "type": "CVSS_V3" } ], "summary": "Hugging Face Transformers Regular Expression Denial of Service" }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.