☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 4.3 🐛 CWE-1333
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-1194

CVE-2025-1194 Denial of Service in Huggingface
📅 PUBLISHED: 2025-04-29 11:30 UTC 🔄 UPDATED: 2026-09-23 20:35 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.46%
👁️
0.46% probability
11.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-1194 is a Regular Expression Denial of Service (ReDoS) vulnerability discovered in the Hugging Face Transformers library, specifically within the tokenization_gpt_neox_japanese.py file of the GPT-NeoX-Japanese model. The flaw resides in the SubWordJapaneseTokenizer class, where a regular expression exhibits exponential complexity when processing specially crafted inputs. This leads to excessive backtracking, causing high CPU consumption and potential application downtime, effectively enabling a Denial of Service (DoS) attack. The vulnerability affects version v4.48.1, which is the latest at the time of disclosure. No patch is currently available, and no public proof-of-concept (PoC) or exploit code has been released. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains for environments using this tokenizer.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the PyPI package transformers. Organizations using this library in production, especially for Japanese language models, should monitor for updates and apply mitigations immediately. The lack of a patch increases supply chain risk, as malicious actors could craft inputs to cause service disruption.

CVSS Breakdown & Threat Level

  • CVSS Score: 4.3 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The impact is confined to the vulnerable component.
  • Confidentiality Impact: None (C:N) – No data exposure.
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: Low (A:L) – High CPU usage and potential downtime.

Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation (no authentication, low complexity) and the potential for service disruption make it a concern for high-availability environments.

Deep Dive & Mechanics

The vulnerability is a classic ReDoS (Regular Expression Denial of Service) flaw. In the SubWordJapaneseTokenizer class, a regular expression is used to tokenize Japanese text. The regex contains nested quantifiers or overlapping patterns that cause exponential backtracking when processing specially crafted input strings. For example, a pattern like (a+)+b can cause catastrophic backtracking if the input contains many 'a's followed by a character that is not 'b'. The tokenizer's regex likely has similar characteristics, allowing an attacker to send a small, malicious string that forces the regex engine to explore an exponential number of paths, consuming 100% CPU and blocking the application thread.

The vulnerable code is in tokenization_gpt_neox_japanese.py. The exact regex pattern is not publicly disclosed, but it is known to be in the SubWordJapaneseTokenizer class. The attack vector is network-based, as the tokenizer is typically used in inference pipelines that accept user input.

Vulnerable vs. Patched Code

Since no patch is available, we can only describe the vulnerable code pattern. The vulnerable regex likely looks like:

# Vulnerable pattern (hypothetical)
pattern = r'([a-zA-Z]+)+[0-9]'

This pattern, when applied to a string like "aaaa...b", causes exponential backtracking. A patched version would use atomic grouping or possessive quantifiers to prevent backtracking:

# Patched pattern (hypothetical)
pattern = r'([a-zA-Z]++)+[0-9]'  # Possessive quantifier

Or use a non-backtracking approach:

# Alternative patched pattern
pattern = r'[a-zA-Z]+[0-9]'

Until a patch is released, users must rely on workarounds.

Exploitation & Lab Setup

Red Team (Offensive)

Objective: Trigger a Denial of Service by sending a crafted input to the GPT-NeoX-Japanese tokenizer.

Lab Setup:

  1. Install the vulnerable version: pip install transformers==4.48.1
  2. Use the following Python script to test:
import transformers
from transformers import GPTNeoXForCausalLM, GPTNeoXTokenizerFast

# Load the tokenizer (Japanese model)
tokenizer = GPTNeoXTokenizerFast.from_pretrained("tokenizer_name")

# Craft a malicious input (example pattern)
malicious_input = "a" * 100 + "!"  # Adjust based on actual regex

# Trigger the vulnerability
try:
    tokens = tokenizer(malicious_input)
except Exception as e:
    print(f"Error: {e}")

Note: The exact malicious string depends on the undisclosed regex. Use fuzzing to identify the pattern.

Exploit Code: No public exploit exists. The above script is a conceptual test.

Blue Team (Defensive)

Detection: Monitor CPU usage spikes and application hangs. Use the detection rules below.

Mitigation:

  • Implement input validation to limit string length and character types.
  • Use a Web Application Firewall (WAF) to block suspicious patterns.
  • Apply rate limiting to tokenizer endpoints.
  • Consider using a timeout wrapper for the tokenizer function.

Indicators of Compromise (IOCs)

  • Network: Unusual high CPU usage on servers running Hugging Face Transformers.
  • Logs: Application logs showing repeated tokenization failures or timeouts.
  • Process: High CPU consumption by Python processes using the transformers library.
  • File: No specific file IOCs; the attack is input-based.

Detection Engineering

YARA Rule

rule CVE_2025_1194_ReDoS_Transformers {
    meta:
        description = "Detects potential ReDoS attack patterns targeting Hugging Face Transformers GPT-NeoX-Japanese tokenizer"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-1194"
    strings:
        $re_pattern = /([a-zA-Z]+)+[0-9]/  // Hypothetical pattern; adjust based on actual regex
        $long_string = /[a-zA-Z]{50,}/  // Long alphabetic strings
    condition:
        $re_pattern and $long_string
}

Sigma Rule

title: CVE-2025-1194 ReDoS Attempt Against Hugging Face Transformers
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential ReDoS attack via crafted input to GPT-NeoX-Japanese tokenizer
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: python
detection:
    selection:
        EventID: 100  # Example event ID for tokenizer errors
        Message|contains: "tokenization_gpt_neox_japanese"
    condition: selection
falsepositives:
    - Legitimate long Japanese text
level: medium

Suricata Rule

alert tcp any any -> any 80 (msg:"CVE-2025-1194 ReDoS Attempt Against Hugging Face Transformers"; flow:to_server,established; content:"tokenization_gpt_neox_japanese"; nocase; pcre:"/([a-zA-Z]+)+[0-9]/"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Input Validation: Limit the length and character set of inputs to the tokenizer. For example, reject strings longer than 1000 characters or containing only alphabetic characters.
  2. Timeout Wrapper: Wrap the tokenizer call with a timeout to prevent indefinite hangs:
    import signal
    class TimeoutError(Exception):
        pass
    def handler(signum, frame):
        raise TimeoutError("Tokenizer timeout")
    signal.signal(signal.SIGALRM, handler)
    signal.alarm(5)  # 5 seconds timeout
    try:
        tokens = tokenizer(input_text)
    except TimeoutError:
        print("Timeout - possible ReDoS attack")
    finally:
        signal.alarm(0)
    
  3. Rate Limiting: Implement rate limiting on endpoints that use the tokenizer.
  4. WAF Rules: Deploy WAF rules to block patterns matching the vulnerable regex.

Long-Term Fix:

  • Monitor the Hugging Face repository for a patch. Once available, update to the patched version.
  • Consider switching to an alternative tokenizer if the Japanese model is not critical.

Valters IT Signature: This report is provided by Valters IT for educational and defensive purposes. Unauthorized exploitation is illegal.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-1194/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.