Last seen September 12, 2025

AI Security Vulnerability

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically affecting the MarianTokenizer's `remove_language_code()` method. This vulnerability is present in version 4.52.4 and has been fixed in version 4.53.0. The issue arises from inefficient regex processing, which can be exploited by crafted input strings containing malformed language code patterns, leading to excessive CPU consumption and potential denial of service.

Technical Severity
Low severity
Lifecycle Status

RESOLVED

What Happened

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically affecting the MarianTokenizer's `remove_language_code()` method. This vulnerability is present in version 4.52.4 and has been fixed in version 4.53.0. The issue arises from inefficient regex processing, which can be exploited by crafted input strings containing malformed language code patterns, leading to excessive CPU consumption and potential denial of service.

Why This Matters

Current evidence identifies a security issue involving Hugging Face Transformers, but does not yet support a more specific impact claim.

Recommended Action

No confirmed vendor remediation is available in the current evidence. Confirm whether Hugging Face Transformers is present in your environment and review the affected configuration.

Exposure

My Interests Exposure

Exposure unknown

Recommended Response
Last Seen

Sep 12, 2025 18:00

Exposure reason: This incident does not currently match a technology in My Interests.

Exploitation status: UNKNOWN

Primary entities:

vulnerabilityHugging Face TransformersMarianTokenizerReDoShuggingface/transformers

Timeline

  • Incident first seen
    Sep 12, 2025 18:00

    BugSkan first recorded this incident.

  • Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer
    Sep 12, 2025 18:00

    OSV.dev · Research

Sources

Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer

OSV.dev · Sep 12, 2025 18:00

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically affecting the MarianTokenizer's `remove_language_code()` method. This vulnerability is present in version 4.52.4 and has been fixed in version 4.53.0. The issue arises from inefficient regex processing, which can be exploited by crafted input strings containing malformed language code patterns, leading to excessive CPU consumption and potential denial of service.

Open publisher source

My Interests Match

Want personalized relevance?

Create an account to see which incidents overlap with your interests.

← Back to incident intelligence