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.
What is the risk?
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.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Transformers | pip | — | No patch |
| Transformers | pip | < 4.50.0 | 4.50.0 |
How severe is it?
What is the attack surface?
What should I do?
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.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
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.39%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0029 Denial of AI Service AML.T0034 Cost Harvesting AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-1333 Inefficient Regular Expression Complexity
Primary
CWE-1333 Inefficient Regular Expression Complexity CWE-1333 — Inefficient Regular Expression Complexity: The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.
- [Architecture and Design] Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.
- [System Configuration] Set backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.
Source: MITRE CWE corpus.
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-2026-26210 9.8 KTransformers: pickle RCE via unauthenticated ZMQ socket
Same package: transformers CVE-2024-3568 9.6 HuggingFace Transformers: RCE via pickle deserialization
Same package: transformers CVE-2026-5241 9.6 transformers: trust_remote_code bypass enables RCE via model load
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