Skip to content
Misconfiguration Disclosed report Advanced CVE-2021-22897

CVE-2021-22897: schannel cipher selection surprise

A static array in libcurl's Schannel cipher selection meant the last configured cipher list could override other connections' settings, potentially giving wrong cipher configuration.

nyymi Follow

Originally disclosed on HackerOne

  • Triaged in 10 hours
  • Fixed in 33 days
  • Paid in 14 days
  • Disclosed after 33 days

Summary:

Commit "schannel: support selecting ciphers" added support for selecting the ciphers with SCHANNEL. However, due to use of a static algIds array for ciphers in set_ssl_ciphers the last configured cipher list will override configuration used by other connections, leading to potential wrong configuration for them. This may have security implications if insecure cipher configuration is used where secure cipher configuration is expected.

Steps To Reproduce:

1.Create two or more separate curl handles with curl_easy_init 2. Set different cipher lists with curl_easy_setopt CURLOPT_SSL_CIPHER_LIST to the curl handles 3. Create simultaneous connections with there the separate curl handles

Instead of each connection using the specific cipher list some of them will share the wrong configuration. If/how this happens exactly depends on how the connection setup overlaps.

Note that to be vulnerable some existing application using libcurl would needs to use such mixed CURLOPT_SSL_CIPHER_LIST configuration with multiple curl handles to begin with. It is not really known how likely this really is, but it seems somewhat rare use case.

Supporting Material/References:

Impact

Potentially wrong cipher configuration used for connections.

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 a static array used to store cipher identifiers in the Schannel backend, causing the last configured cipher list to overwrite previous ones.

Impact

Potentially wrong cipher configuration used for connections, which may have security implications if insecure ciphers are used where secure ones are expected.

What the attacker needed

Application uses libcurl with Schannel; multiple curl handles with different cipher lists; simultaneous connections

How it was found

  1. Create two or more separate curl handles with curl_easy_init
  2. Set different cipher lists with curl_easy_setopt CURLOPT_SSL_CIPHER_LIST to the curl handles
  3. Create simultaneous connections with the separate curl handles

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 uses libcurl to make secure connections, it can specify which encryption methods (ciphers) to use. A bug meant that if two connections were set up at the same time with different cipher lists, one connection might accidentally use the other's list. This could make a connection less secure than intended.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

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.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.