Skip to content
Heist/ feed
Back to feed
Medium

Regular Expression Denial of Service (ReDoS) in huggingface/transformers

Type: advisorySources: OSV

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the `get_configuration_file()` function within the `transformers.configuration_utils` module. The affected version is 4.49.0, and the issue is resolved in version 4.51.0. The vulnerability arises from the use of a regular expression pattern `config\.(.*)\.json` that can be exploited to cause excessive CPU consumption through crafted input strings, leading to catastrophic backtracking. This can result in model serving disruption, resource exhaustion, and increased latency in applications using the library.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-3263
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 01:09 UTC · Revision 1

Source evidence

Regular Expression Denial of Service (ReDoS) in huggingface/transformers

core-osv · Original source

Published 7 Jul 2025, 09:54 UTC

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the `get_configuration_file()` function within the `transformers.configuration_utils` module. The affected version is 4.49.0, and the issue is resolved in version 4.51.0. The vulnerability arises from the use of a regular expression pattern `config\.(.*)\.json` that can be exploited to cause excessive CPU consumption through crafted input strings, leading to catastrophic backtracking. This can result in model serving disruption, resource exhaustion, and increased latency in applications using the library.

osv:CVE-2025-3263
Complete source record
{
  "id": "d4324b7f3605aa13d25542a9d789d86695800837d4f485dab4cd4427bf7a18be",
  "url": "https://osv.dev/vulnerability/CVE-2025-3263",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Regular Expression Denial of Service (ReDoS) in huggingface/transformers",
    "summary": "A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the `get_configuration_file()` function within the `transformers.configuration_utils` module. The affected version is 4.49.0, and the issue is resolved in version 4.51.0. The vulnerability arises from the use of a regular expression pattern `config\\.(.*)\\.json` that can be exploited to cause excessive CPU consumption through crafted input strings, leading to catastrophic backtracking. This can result in model serving disruption, resource exhaustion, and increased latency in applications using the library.",
    "evidence": "osv:CVE-2025-3263",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-3263",
      "aliases": [
        "CVE-2025-3263",
        "GHSA-q2wp-rjmx-x6x9",
        "PYSEC-2026-1987"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/huggingface/transformers",
              "type": "GIT",
              "events": [
                {
                  "introduced": "84f0186e8971a21bcda9b446a8a74f0f1a958f1c"
                },
                {
                  "fixed": "0720e206c6ba28887e4d60ef60a6a089f6c1cc76"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.51.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "SplitRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0720e206c6ba28887e4d60ef60a6a089f6c1cc76"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "cpe": "cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.49.0"
                      },
                      {
                        "fixed": "4.51.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.50.3-DeepSeek-3",
            "v4.49.0-Mistral-3",
            "v4.49.0-AyaVision"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-3263.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.638977246Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/c7a69150-54f8-4e81-8094-791e7a2a0f29",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/3xxx/CVE-2025-3263.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-3263",
        "https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1333"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/3xxx/CVE-2025-3263.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-3263",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521214,
  "published_at": "2025-07-07T09:54:59.67+00:00"
}