Improper Input Validation in huggingface/transformers
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-3777
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 20:33 UTC · Revision 1
Source evidence
Improper Input Validation in huggingface/transformers
core-osv · Original sourcePublished 7 Jul 2025, 09:55 UTC
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.
osv:CVE-2025-3777
Complete source record
{
"id": "8178c6708847a5b98b7ec20ce5471e052409ed616ab29827f87c3b5ac0e14133",
"url": "https://osv.dev/vulnerability/CVE-2025-3777",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Improper Input Validation in huggingface/transformers",
"summary": "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.",
"evidence": "osv:CVE-2025-3777",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2025-3777",
"aliases": [
"CVE-2025-3777",
"GHSA-phhr-52qp-3mj4",
"PYSEC-2026-1986"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/huggingface/transformers",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "945727948c1143a10ac6f7d811aa58bb0d126b5b"
},
{
"fixed": "4dda5f71b35fb70cf602187eef84bb17a50b9082"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.52.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "4dda5f71b35fb70cf602187eef84bb17a50b9082"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v4.52.0",
"v4.51.3-CSM-preview",
"v4.51.3-GraniteMoeHybrid-preview",
"v4.51.3-LlamaGuard-preview",
"v4.51.3-D-FINE-preview",
"v4.51.3-SAM-HQ-preview",
"v4.51.3-BitNet-preview",
"v4.51.3-InternVL-preview",
"v4.51.3-Janus-preview",
"v4.51.3-TimesFM-preview",
"v4.51.3-MLCD-preview",
"v4.51.3-Qwen2.5-Omni-preview",
"v4.50.3-DeepSeek-3",
"v4.49.0-Mistral-3",
"v4.49.0-AyaVision",
"v4.49.0-SigLIP-2",
"v4.49.0-SmolVLM-2",
"v4.33.1",
"v4.16.0",
"v4.15.0",
"v4.14.0",
"v4.13.0",
"v4.12.0",
"v4.11.0",
"v4.10.0",
"v4.9.0",
"v4.8.0",
"v4.7.0",
"v4.6.0",
"v4.5.0",
"v4.4.0",
"v4.3.0.rc1",
"4.3.0.rc1",
"v4.2.0",
"v4.1.1",
"v4.1.0",
"v3.5.0",
"v3.4.0",
"v3.3.1",
"v3.3.0",
"v3.2.0",
"v3.1.0",
"v3.0.2",
"v3.0.1",
"3.0.1",
"v3.0.0",
"v2.11.0",
"v2.10.0",
"v2.9.1",
"v2.9.0",
"v2.8.0",
"v2.7.0",
"v2.6.0",
"v2.5.1",
"v2.5.0",
"v2.4.1",
"v2.4.0",
"v2.3.0",
"v2.2.2",
"v2.2.1",
"v2.2.0",
"v2.1.1",
"v2.1.0",
"v2.0.0",
"1.2.0",
"1.1.0",
"1.0",
"v0.6.2",
"v0.6.1",
"v0.6.0",
"v0.5.1",
"v0.5.0",
"0.5.0",
"v0.4.0",
"v0.3.0",
"v0.2.0",
"v0.1.2",
"0.1.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-3777.json"
}
}
],
"modified": "2026-10-28T02:30:32.192049459Z",
"provider": "osv",
"references": [
"https://huntr.com/bounties/ccba0730-9248-4853-b7ff-5c20e6364f09",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/3xxx/CVE-2025-3777.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-3777",
"https://github.com/huggingface/transformers/commit/4dda5f71b35fb70cf602187eef84bb17a50b9082"
],
"provider_metadata": {
"cwe_ids": [
"CWE-20"
],
"cna_assigner": "@huntr_ai",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/3xxx/CVE-2025-3777.json"
}
},
"related_cves": [
{
"value": "CVE-2025-3777",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 498955,
"published_at": "2025-07-07T09:55:38.19+00:00"
}