Bug 2367239 (CVE-2025-2099) - CVE-2025-2099 transformers: Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Summary: CVE-2025-2099 transformers: Regular Expression Denial of Service (ReDoS) in h...
Keywords:
Status: NEW
Alias: CVE-2025-2099
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-19 12:01 UTC by OSIDB Bzimport
Modified: 2025-08-04 20:33 UTC (History)
33 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2025:12791 0 None None None 2025-08-04 20:33:00 UTC

Description OSIDB Bzimport 2025-05-19 12:01:09 UTC
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.

Comment 4 errata-xmlrpc 2025-08-04 20:32:57 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.5 for RHEL 8
  Red Hat Ansible Automation Platform 2.5 for RHEL 9

Via RHSA-2025:12791 https://access.redhat.com/errata/RHSA-2025:12791


Note You need to log in before you can comment on or make changes to this bug.