Skip to content
Account takeover Disclosed report Advanced CVE-2023-27536

CVE-2023-27536: GSS delegation too eager connection re-use

libcurl and curl did not consider the GSSAPI delegation setting when deciding whether to reuse an existing connection. An attacker could potentially benefit from a connection established under a laxer delegation policy being reused for a request that asked for stricter or no delegation.

nyymi Follow

Originally disclosed on HackerOne

  • Triaged in 2 days
  • Fixed in 13 days
  • Disclosed after 15 days

Summary:

When considering reuse of existing connections different CURLOPT_GSSAPI_DELEGATION (libcurl) --delegation (curl) option is not taken into consideration. This can lead to reuse of previously established connection when it should no longer be (as more strict or no delegation was requested).

Steps To Reproduce:

  1. curl --negotiate -u : --delegation "always" https://server/path -: --negotiate -u : --delegation "none" https://server/path

Remediation

  • Safest option is to not reuse connections if different CURLOPT_GSSAPI_DELEGATION levels are being used. It might also be correct to not reuse connections with "laxer" CURLOPT_GSSAPI_DELEGATION: "none" should only allow reusing "none" level, "policy" should only allow "none" or "policy" level, while "always" can reuse all connections otherwise deemed appropriate for reuse.

Impact

Existing connection that was established via more lax delegation will be reused for connection that should not succeed due to more restrictive delegation requested. The practical impact can vary, but I believe it is likely quite low, as it should be quite rare to have connections attempted with mixed delegation policies like this.

The original report as published on HackerOne, by nyymi. 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 the connection reuse logic did not include the GSSAPI delegation level in its cache key or comparison, so connections were matched regardless of that setting.

Impact

A connection set up under a laxer delegation policy could be reused for a request that should not succeed under a stricter policy, though the practical impact is believed to be quite low and such mixed-policy use is rare.

What the attacker needed

Kerberos/GSSAPI authentication in use; mixed delegation levels in one process

The fix

The report suggests not reusing connections across different delegation levels, or only allowing reuse from equal or stricter levels.

How it was found

  1. Run curl twice in one command, first with delegation set to always, then with delegation set to none, against the same server and path.

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 says the program ignored a security setting about how much of your login credentials may be passed on to the server when it decided to reuse an old connection. So a request that asked for less sharing could end up on a connection that had been set up to share more.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by nyymi

View all

51 more disclosed reports, best first.

More from curl

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.