Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <s5rs5174-q08r-s115-qo65-7871rpp9s6n0@unkk.fr>
Date: Wed, 7 Jan 2026 08:09:30 +0100 (CET)
From: Daniel Stenberg <daniel@...x.se>
To: curl security announcements -- curl users <curl-users@...ts.haxx.se>, 
    curl-announce@...ts.haxx.se, libcurl hacking <curl-library@...ts.haxx.se>, 
    oss-security@...ts.openwall.com
Subject: [ADVISORY] curl CVE-2025-14524: bearer token leak on cross-protocol
 redirect

bearer token leak on cross-protocol redirect
============================================

Project curl Security Advisory, January 7 2026 -
[Permalink](https://curl.se/docs/CVE-2025-14524.html)

VULNERABILITY
-------------

When an oauth2 bearer token is used for an HTTP(S) transfer, and that transfer
performs a cross-protocol redirect to a second URL that uses an IMAP, LDAP,
POP3 or SMTP scheme, curl might wrongly pass on the bearer token to the new
target host.

INFO
----

By default, curl only allows redirects to HTTP(S) and FTP(S), but can be asked
to allow redirects to all protocols curl supports. This vulnerability only
triggers for users who use OAUTH2 bearer and who actively enable redirects to
one of the four protocols mentioned above and one of those schemes is used in
the HTTP redirect. A highly unusual combination.

The redirect-to URL needs to have the user name component set (but not the
password) to trigger this flaw.

This token leak also happens if the redirect is done to the same hostname,
just a different protocol (and port).

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

CWE-522: Insufficiently Protected Credentials

Severity: Low

AFFECTED VERSIONS
-----------------

- Affected versions: curl 7.33.0 to and including 8.17.0
- Not affected versions: curl < 7.33.0 and >= 8.18.0
- Introduced-in: https://github.com/curl/curl/commit/06c1bea72faabb6fad4b7ef8

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
------------

Starting in curl 8.18.0, this mistake is fixed.

- Fixed-in: https://github.com/curl/curl/commit/1a822275d333dc6da6043497160fd

RECOMMENDATIONS
--------------

  A - Upgrade curl to version 8.18.0

  B - Avoid allowing cross-protocol redirects

  C - Avoid using oauth2 bearer tokens

TIMELINE
--------

This issue was reported to the curl project on December 9, 2025. We contacted
distros@...nwall on December 30, 2025.

curl 8.18.0 was released on January 7 2026 around 07:00 UTC, coordinated
with the publication of this advisory.

The curl security team is not aware of any active exploits using this
vulnerability.

CREDITS
-------

- Reported-by: anonymous237 on hackerone
- Patched-by: Daniel Stenberg

Thanks a lot!

-- 

  / daniel.haxx.se || https://rock-solid.curl.dev

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.