Skip to content
Info disclosure Disclosed report Intermediate

Hackers Attack Curl Vulnerability Accessing Sensitive Information

Curl may leak passwords from a .netrc file when following an HTTP redirect to a different host.

scottarterbury Follow

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.

The original report as published on HackerOne, by scottarterbury. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Use curl with a .netrc file for credentials and follow an HTTP redirect.
  2. Ensure the .netrc file has an entry for the redirect target hostname.
  3. 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.

More from curl

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.