Staging Environment: Content and features may be unstable or change without notice.
Search for vulnerabilities
Vulnerability details: VCID-ydge-4zba-3khn
Vulnerability ID VCID-ydge-4zba-3khn
Aliases CVE-2025-2099
GHSA-qq3j-4f4f-9583
PYSEC-2025-40
Summary 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.
Status Published
Exploitability 0.5
Weighted Severity 6.8
Risk 3.4
Affected and Fixed Packages Package Details
Weaknesses (3)
System Score Found at
cvssv3 7.5 https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-2099.json
epss 0.00092 https://api.first.org/data/v1/epss?cve=CVE-2025-2099
epss 0.00092 https://api.first.org/data/v1/epss?cve=CVE-2025-2099
cvssv3.1 7.5 https://github.com/advisories/GHSA-qq3j-4f4f-9583
cvssv3.1 5.3 https://github.com/huggingface/transformers
generic_textual MODERATE https://github.com/huggingface/transformers
cvssv3 5.3 https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
cvssv3.1 5.3 https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
cvssv3.1 7.5 https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
generic_textual MODERATE https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
ssvc Track https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
cvssv3.1 5.3 https://github.com/huggingface/transformers/pull/36648
generic_textual MODERATE https://github.com/huggingface/transformers/pull/36648
cvssv3.1 5.3 https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2025-40.yaml
generic_textual MODERATE https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2025-40.yaml
cvssv3 5.3 https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
cvssv3.1 5.3 https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
cvssv3.1 7.5 https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
generic_textual MODERATE https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
ssvc Track https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
cvssv3.1 5.3 https://nvd.nist.gov/vuln/detail/CVE-2025-2099
generic_textual MODERATE https://nvd.nist.gov/vuln/detail/CVE-2025-2099
No exploits are available.
Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Found at https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-2099.json
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Found at https://github.com/advisories/GHSA-qq3j-4f4f-9583
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://github.com/huggingface/transformers
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Found at https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none


Vector: SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2025-05-19T13:38:03Z/ Found at https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57
Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://github.com/huggingface/transformers/pull/36648
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://github.com/pypa/advisory-database/tree/main/vulns/transformers/PYSEC-2025-40.yaml
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Found at https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none


Vector: SSVCv2/E:P/A:Y/T:P/P:M/B:A/M:M/D:T/2025-05-19T13:38:03Z/ Found at https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4
Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Found at https://nvd.nist.gov/vuln/detail/CVE-2025-2099
Attack Vector (AV) Attack Complexity (AC) Privileges Required (PR) User Interaction (UI) Scope (S) Confidentiality Impact (C) Integrity Impact (I) Availability Impact (A)

network

adjacent_network

local

physical

low

high

none

low

high

none

required

unchanged

changed

high

low

none

high

low

none

high

low

none

Exploit Prediction Scoring System (EPSS)
Percentile 0.25811
EPSS Score 0.00092
Published At June 11, 2026, 12:55 p.m.
Date Actor Action Source VulnerableCode Version
2026-06-11T17:17:42.518405+00:00 Vulnrichment Import https://github.com/cisagov/vulnrichment/blob/develop/2025/2xxx/CVE-2025-2099.json 38.6.0