Skip to content
Access control Disclosed report Advanced CVE-2026-19931

CVE-2026-19931: Negotiate ambient user conn reuse

In curl 8.21.0 on Windows with SSPI/Negotiate, a connection authenticated using ambient credentials could be reused for a later request that supplied different explicit credentials. This meant a request configured for one user could be processed by the server as the previously authenticated identity.

dukek Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 26 days
  • Disclosed after 27 days

Summary

On Windows with SSPI/Negotiate, curl 8.21.0 can reuse a connection authenticated with ambient credentials for a later request using different explicit credentials.

In url_match_auth_nego(), the credential comparison is skipped when conn->creds == NULL. This allows a connection authenticated as one identity to be reused for a request configured with another identity. In my reproducer, request A authenticates as Administrator, request B supplies credentials for userB, but the server processes B as Administrator.

curl 8.20.0 does not reproduce this issue.

Affected version

Reproduced with libcurl 8.21.0 on Windows using SSPI/SPNEGO.

Root cause

In 8.21.0:

C
if(m->want_nego_http) {
  if(conn->creds &&
     (!Curl_creds_same(conn->creds, m->data->state.creds) ||
      !Curl_peer_equal(conn->creds_origin, m->data->state.origin)))
    return FALSE;
}

The credential/origin comparison is only performed when conn->creds is non-NULL. Connections authenticated through ambient SSPI credentials can have conn->creds == NULL, so the check is skipped.

Steps To Reproduce

  1. Run the attached local Windows Negotiate server.
  2. Run the PoC as Windows user A (Administrator in my test).
  3. Request A uses CURLAUTH_NEGOTIATE without explicit credentials.
  4. Request B uses another easy handle on the same CURLM with explicit credentials for userB.
  5. On curl 8.21.0, request B reuses A's connection.

Observed:

Text
8.20.0:
A default        -> Administrator
B explicit userB -> userB

8.21.0:
A default        -> Administrator
B explicit userB -> Administrator

Disabling connection reuse causes B to authenticate correctly as userB.

Attached:

  • poc.c - minimal libcurl reproducer
  • server.cs - minimal local Negotiate server

Impact

A request configured for one user may execute using the identity of a previously authenticated pooled connection.

Suggested fix

The credential/origin comparison should depend on whether the connection has entered Negotiate authentication state, rather than whether conn->creds is non-NULL:

Diff
 if(m->want_nego_http) {
-  if(conn->creds &&
+  if((conn->http_negotiate_state != GSS_AUTHNONE) &&
      (!Curl_creds_same(conn->creds, m->data->state.creds) ||
       !Curl_peer_equal(conn->creds_origin, m->data->state.origin)))
     return FALSE;
 }

The original report as published on HackerOne, by dukek. 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

The connection-reuse check compared credentials only when the stored connection credentials were non-NULL, but ambient SSPI authentication leaves them NULL, so the comparison was skipped.

Impact

A request configured for one user may execute using the identity of a previously authenticated pooled connection.

What the attacker needed

Windows with SSPI/Negotiate; libcurl 8.21.0; connection reuse enabled; ambient credentials available

The fix

The credential and origin comparison should depend on whether the connection has entered Negotiate authentication state rather than on whether the stored credentials are non-NULL.

How it was found

  1. Run the local Windows Negotiate server.
  2. Run the proof-of-concept as Windows user A.
  3. Send request A using Negotiate without explicit credentials.
  4. Send request B on the same multi handle with explicit credentials for userB.
  5. Observe that request B reuses A's connection and is processed as user A.

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 program talks to a server, it can keep the connection open and reuse it for later requests to save time. This report shows that curl sometimes reused a connection that had been logged in as one user for a request meant to be a different user, so the server saw the wrong person. That matters because actions could be taken with someone else's permissions.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from curl

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.