Security mailing lists by PureSourceCode

CVE-2025-5197

MEDIUM 5.3CVSS 3.0

Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability

A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically in the convert_tf_weight_name_to_pt_weight_name() function. This function, responsible for converting TensorFlow weight names to PyTorch format, uses a regex pattern /[^/]*___([^/]*)/ that can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. The vulnerability affects versions up to 4.51.3 and is fixed in version 4.53.0. This issue can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting model conversion processes between TensorFlow and PyTorch formats.

Published
6 Aug 2025
Last modified
10 Sep 2026
Assigned by
security@huntr.dev
NVD status
Analyzed
Weakness
CWE-1333
Also known as
GHSA-9356-575x-2w9mPYSEC-2026-1983
Sources
NVDJSONOSV GHSA-9356-575x-2w9mJSONOSV PYSEC-2026-1983JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security@huntr.dev (Secondary) CVSS 3.0 MEDIUM 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
OSV GitHub CVSS 3.0 MEDIUM 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
OSV PyPA CVSS 3.0 MEDIUM 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD huggingface transformers
cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*
< 4.53.0 4.53.0
OSV PyPI transformers < 4.53.0 4.53.0

References

History

  • 25 Nov 2026 20:58 UTC · NVD: first stored (published 6 Aug 2025)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 6 Aug 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.