CVE-2025-1194: transformers: ReDoS in GPT-NeoX Japanese tokenizer
GHSA-fpwr-67px-3qhx MEDIUM PoC AVAILABLE CISA: TRACK*Upgrade HuggingFace Transformers to 4.50.0 immediately if your stack includes any Japanese NLP workloads. The ReDoS in SubWordJapaneseTokenizer can peg CPU to 100% via a single crafted input, taking down inference services or preprocessing pipelines. If you are not running Japanese language models, your exposure is zero — this is a narrow but real availability risk for those who are.
Risk Assessment
Actual risk is low-to-moderate despite CVSS 6.5. EPSS of 0.00078 signals no active exploitation. Attack vector is network but requires user interaction — a downstream user or API consumer must submit the malicious payload to a tokenizer-exposed endpoint. Impact is purely availability (DoS), with no data loss or confidentiality breach. Blast radius is limited to organizations running GPT-NeoX-Japanese models. The fix is available and straightforward (pip upgrade), making residual risk low for patched systems.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| transformers | pip | — | No patch |
| 160.4K
OpenSSF 4.9 7.9K dependents
Pushed yesterday 39% patched
~101d to patch
Full package profile →
| |||
| transformers | pip | < 4.50.0 | 4.50.0 |
| 160.4K
OpenSSF 4.9 7.9K dependents
Pushed yesterday 39% patched
~101d to patch
Full package profile →
| |||
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade transformers to ≥4.50.0 (pip install --upgrade transformers). This is the only complete fix.
-
WORKAROUND (if upgrade is blocked): Implement input length caps and character class validation before tokenization; reject inputs exceeding a safe threshold for Japanese text.
-
DETECTION
Monitor inference server CPU utilization for sustained spikes correlated with single requests; alert on requests exceeding 2-3x normal tokenization latency.
-
CONTAINMENT
If running multi-tenant inference, isolate Japanese tokenizer workloads to dedicated workers with CPU throttling (cgroups/ulimit) to prevent cross-tenant DoS.
-
VALIDATION
After patching, confirm version with
pip show transformers | grep Version.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-1194?
Upgrade HuggingFace Transformers to 4.50.0 immediately if your stack includes any Japanese NLP workloads. The ReDoS in SubWordJapaneseTokenizer can peg CPU to 100% via a single crafted input, taking down inference services or preprocessing pipelines. If you are not running Japanese language models, your exposure is zero — this is a narrow but real availability risk for those who are.
Is CVE-2025-1194 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-1194, increasing the risk of exploitation.
How to fix CVE-2025-1194?
1. PATCH: Upgrade transformers to ≥4.50.0 (pip install --upgrade transformers). This is the only complete fix. 2. WORKAROUND (if upgrade is blocked): Implement input length caps and character class validation before tokenization; reject inputs exceeding a safe threshold for Japanese text. 3. DETECTION: Monitor inference server CPU utilization for sustained spikes correlated with single requests; alert on requests exceeding 2-3x normal tokenization latency. 4. CONTAINMENT: If running multi-tenant inference, isolate Japanese tokenizer workloads to dedicated workers with CPU throttling (cgroups/ulimit) to prevent cross-tenant DoS. 5. VALIDATION: After patching, confirm version with `pip show transformers | grep Version`.
What systems are affected by CVE-2025-1194?
This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, NLP processing pipelines, batch inference.
What is the CVSS score for CVE-2025-1194?
CVE-2025-1194 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.08%.
Technical Details
NVD Description
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file `tokenization_gpt_neox_japanese.py` of the GPT-NeoX-Japanese model. The vulnerability occurs in the SubWordJapaneseTokenizer class, where regular expressions process specially crafted inputs. The issue stems from a regex exhibiting exponential complexity under certain conditions, leading to excessive backtracking. This can result in high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.48.1 (latest).
Exploitation Scenario
An adversary targeting a Japanese-language sentiment analysis or document processing SaaS API sends a POST request with a specially crafted string designed to trigger catastrophic backtracking in the SubWordJapaneseTokenizer regex engine. No authentication is required if the endpoint is public-facing. The regex processes the input, enters exponential backtracking, and the worker process consumes 100% CPU for an extended period. In a Kubernetes deployment, liveness probes time out and the pod restarts, creating a cycle exploitable to maintain denial of service with low-rate request flooding. The PoC is public via huntr.com, making this accessible to low-sophistication actors targeting Japanese NLP services.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H References
- github.com/advisories/GHSA-fpwr-67px-3qhx
- nvd.nist.gov/vuln/detail/CVE-2025-1194
- github.com/huggingface/transformers/commit/92c5ca9dd70de3ade2af2eb835c96215cc50e815 Patch
- huntr.com/bounties/86f58dcd-683f-4adc-a735-849f51e9abb2 Exploit 3rd Party
- github.com/ARPSyndicate/cve-scores Exploit
- github.com/Kwaai-AI-Lab/OpenAI-Petal Exploit
- github.com/fkie-cad/nvd-json-data-feeds Exploit
Timeline
Related Vulnerabilities
CVE-2024-3568 9.6 HuggingFace Transformers: RCE via pickle deserialization
Same package: transformers CVE-2023-6730 8.8 HuggingFace Transformers: RCE via unsafe deserialization
Same package: transformers CVE-2024-11392 8.8 HuggingFace Transformers: RCE via config deserialization
Same package: transformers CVE-2024-11393 8.8 Transformers: RCE via MaskFormer model deserialization
Same package: transformers CVE-2024-11394 8.8 Transformers: RCE via Trax model deserialization
Same package: transformers
AI Threat Alert