Skip to content
Open redirect Disclosed report Beginner CVE-2025-3777

Transformers's Improper Input Validation vulnerability can be exploited through username injection

The image loading utility in Hugging Face Transformers validated URLs with a simple prefix check, so a crafted URL could appear to start with a trusted domain while actually pointing elsewhere. An attacker could use this to direct users to malicious sites for phishing or malware.

huggingface/transformers

Originally disclosed on huntr

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.

From the GitHub Advisory Database (GHSA-phhr-52qp-3mj4, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

Attackers could craft URLs that appear to be from YouTube but resolve to malicious domains, potentially leading to phishing attacks, malware distribution, or data exfiltration.

What the attacker needed

Crafted URL; user interacts with the URL

The fix

The issue was fixed in version 4.52.1.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A program checked whether a web address began with a trusted name, like checking if a sentence starts with 'Hello'. But web addresses can include a username part before the real site, so an attacker could make an address that starts with the trusted name yet actually goes to a different, harmful site. This could trick people into visiting fake pages or downloading malware.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

More from huggingface/transformers

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.