Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:pypi/transformers@4.52.1
purl pkg:pypi/transformers@4.52.1
Next non-vulnerable version 5.0.0rc3
Latest non-vulnerable version 5.0.0rc3
Risk
Vulnerabilities affecting this package (5)
Vulnerability Summary Fixed by
VCID-3gc6-hf7m-qbfn
Aliases:
CVE-2025-6638
GHSA-59p9-h35m-wg4g
transformers: Regular Expression Denial of Service (ReDoS) in huggingface/transformers
4.53.0
Affected by 1 other vulnerability.
VCID-46y8-cawt-g7br
Aliases:
CVE-2025-6921
GHSA-4w7r-h757-3r74
Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer The huggingface/transformers library, versions prior to 4.53.0, is vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer. The vulnerability arises from the _do_use_weight_decay method, which processes user-controlled regular expressions in the include_in_weight_decay and exclude_from_weight_decay lists. Malicious regular expressions can cause catastrophic backtracking during the re.search call, leading to 100% CPU utilization and a denial of service. This issue can be exploited by attackers who can control the patterns in these lists, potentially causing the machine learning task to hang and rendering services unresponsive.
4.53.0
Affected by 1 other vulnerability.
VCID-aqqd-thbn-byaf
Aliases:
CVE-2026-1839
GHSA-69w3-r845-3855
transformers: HuggingFace Transformers: Arbitrary code execution via malicious checkpoint file
5.0.0rc3
Affected by 0 other vulnerabilities.
VCID-s9jb-vbrz-2qa5
Aliases:
CVE-2025-6051
GHSA-rcv9-qm8p-9p6j
transformers: Regular Expression Denial of Service (ReDoS) in huggingface/transformers
4.53.0
Affected by 1 other vulnerability.
VCID-w57w-5mrk-cqbr
Aliases:
CVE-2025-5197
GHSA-9356-575x-2w9m
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.
4.53.0
Affected by 1 other vulnerability.
Vulnerabilities fixed by this package (2)
Vulnerability Summary Aliases
VCID-4p99-5cwj-8fbn Transformers's Improper Input Validation vulnerability can be exploited through username injection Hugging Face Transformers versions up to 4.49.0 are affected by an improper input validation vulnerability in the `image_utils.py` file. The vulnerability arises from insecure URL validation using the `startswith()` method, which can be bypassed through URL username injection. This allows attackers to craft URLs that appear to be from YouTube but resolve to malicious domains, potentially leading to phishing attacks, malware distribution, or data exfiltration. The issue is fixed in version 4.52.1. CVE-2025-3777
GHSA-phhr-52qp-3mj4
VCID-pn57-nb2x-n7gw Transformers is vulnerable to ReDoS attack through its DonutProcessor class A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically within the DonutProcessor class's `token2json()` method. This vulnerability affects versions 4.51.3 and earlier, and is fixed in version 4.52.1. The issue arises from the regex pattern `<s_(.*?)>` which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting document processing tasks using the Donut model. CVE-2025-3933
GHSA-37mw-44qp-f5jm

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-06T07:48:27.304420+00:00 GitLab Importer Affected by VCID-aqqd-thbn-byaf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2026-1839.yml 38.6.0
2026-06-06T06:10:31.041310+00:00 GitLab Importer Affected by VCID-46y8-cawt-g7br https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-6921.yml 38.6.0
2026-06-06T06:06:24.435004+00:00 GitLab Importer Affected by VCID-s9jb-vbrz-2qa5 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-6051.yml 38.6.0
2026-06-06T06:06:23.157178+00:00 GitLab Importer Affected by VCID-3gc6-hf7m-qbfn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-6638.yml 38.6.0
2026-06-06T05:57:07.192095+00:00 GitLab Importer Affected by VCID-w57w-5mrk-cqbr https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-5197.yml 38.6.0
2026-06-04T17:13:16.612430+00:00 GithubOSV Importer Fixing VCID-4p99-5cwj-8fbn https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-phhr-52qp-3mj4/GHSA-phhr-52qp-3mj4.json 38.6.0
2026-06-04T17:13:01.650903+00:00 GithubOSV Importer Fixing VCID-pn57-nb2x-n7gw https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-37mw-44qp-f5jm/GHSA-37mw-44qp-f5jm.json 38.6.0
2026-06-04T16:24:22.469780+00:00 GitLab Importer Fixing VCID-pn57-nb2x-n7gw https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-3933.yml 38.6.0
2026-06-04T16:24:19.046033+00:00 GitLab Importer Fixing VCID-4p99-5cwj-8fbn https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/transformers/CVE-2025-3777.yml 38.6.0