Hackers Attack Curl Vulnerability Accessing Sensitive Information
Curl may leak passwords from a .netrc file when following an HTTP redirect to a different host.
Originally disclosed on HackerOne
- Disclosed after 4 days
Summary by the researcher
DISREGARD.
Consider this an example template as I just joined.
Respectfully,
Scott
The report
Summary:
[A critical security flaw in Curl. This is a data transfer tool and may potentially allow attackers to access sensitive information.]
Affected version
[6.5 through 8.11.0]
Steps To Reproduce:
Security vulnerability when curl is used with a .netrc file for the credentials and also uses a HTTP redirect. Curl may leak passwords used for the host that redirects it to the next host.
1.The .netrc file contains an entry matching the redirect target hostname 2. The entry either omits the password or both the login and password
Supporting Material/References:
Affects both the libcurl library and the curl command-line tool.
Impact
Summary:
A curl transfer to a.tld redirect to b.tld along with the .netrc file entry for b.tld password vulnerability. This may expose passwords when it passes through the network.
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
Root cause
Likely, curl did not properly match the redirect target hostname against .netrc entries when deciding which credentials to send.
Impact
Passwords could be exposed when they pass through the network.
What the attacker needed
Curl uses a .netrc file; an HTTP redirect occurs; .netrc entry for redirect target
How it was found
- Use curl with a .netrc file for credentials and follow an HTTP redirect.
- Ensure the .netrc file has an entry for the redirect target hostname.
- The entry either omits the password or both the login and password.
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.
When a site redirected curl to another site, curl could leak the password for the redirecting site, and someone watching the network could see it.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.