curl / Docs / curl CVEs / token leak with redirect and netrc

CVE-2026-3783

token leak with redirect and netrc

Project curl Security Advisory, March 11th 2026 Permalink

VULNERABILITY

When an OAuth2 bearer token is used for an HTTP(S) transfer, and that transfer performs a redirect to a second URL, curl could leak that token to the second hostname under some circumstances.

If the hostname that the first request is redirected to has information in the used .netrc file, with either of the machine or default keywords, curl would pass on the bearer token set for the first host also to the second one.

INFO

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2026-3783 to this issue.

CWE-522: Insufficiently Protected Credentials

Severity: Medium

AFFECTED VERSIONS

libcurl is used by many applications, but not always advertised as such!

This bug is not considered a C mistake. It is not likely to have been avoided had we not been using C.

This flaw also affects the curl command line tool.

SOLUTION

curl 8.19.0 fixes this flaw

RECOMMENDATIONS

We suggest you take one of the following actions immediately, in order of preference:

A - Upgrade to curl and libcurl 8.19.0

B - Apply the patch and rebuild libcurl

C - Avoid using Bearer tokens with redirects

TIMELINE

It was reported to the curl project on March 3rd 2026. We contacted distros@openwall on March 8.

libcurl 8.19.0 was released on March 11th 2026, coordinated with the publication of this advisory.

CREDITS

Thanks a lot!