{
  "id": "CVE-2025-3262",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-3262",
  "published_at": "2025-07-07T09:54:39.079Z",
  "title": "Regular Expression Denial of Service (ReDoS) in huggingface/transformers",
  "vendor": "huggingface",
  "product": "huggingface/transformers",
  "cvss": {
    "score": 7.5,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository, specifically in version 4.49.0. The vulnerability is due to inefficient regular expression complexity in the `SETTING_RE` variable within the `transformers/commands/chat.py` file. The regex contains repetition groups and non-optimized quantifiers, leading to exponential backtracking when processing 'almost matching' payloads. This can degrade application performance and potentially result in a denial-of-service (DoS) when handling specially crafted input strings. The issue is fixed in version 4.51.0.",
  "cwe": "CWE-1333",
  "cpes": [
    "cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 5.3,
    "nvd": 7.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "huggingface",
        "product": "huggingface/transformers",
        "ranges": [
          "\u003e= unspecified, \u003c 4.51.0"
        ],
        "fixed_in": [
          "4.51.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade huggingface/transformers to 4.51.0 or later."
    ],
    "references": [
      {
        "kind": "Patch",
        "url": "https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
