Usage of disabled protocol in curl
A logic error in curl's protocol selection meant that when an option disabled every protocol without adding any, the default protocol set remained allowed. An attacker could then send a request over a plaintext protocol that had been explicitly disabled.
- Triaged in 23 hours
- Fixed in 47 hours
- Paid in 47 hours
- Disclosed after 2 days
Summary by the program
CVE-2024-2004 Usage of disabled protocol
VULNERABILITY When a protocol selection parameter option disables all protocols without adding any then the default set of protocols would remain in the allowed set due to an error in the logic for removing protocols. The below command would perform a request to curl.se with a plaintext protocol which has been explicitly disabled.
curl --proto -all,-http http ://curl.se The flaw is only present if the set of selected protocols disables the entire set of available protocols, in itself a command with no practical use and therefore unlikely to be encountered in real situations. The curl security team has thus assessed this to be low severity bug.
INFO The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2024-2004 to this issue. CWE-115: Misinterpretation of Input Severity: Low
Full Security Advisory: https://curl.se/docs/CVE-2024-2004.html
The report
When a protocol selection parameter option disables all protocols without adding any then the default set of protocols would remain in the allowed set due to an error in the logic for removing protocols. The below command would perform a request to curl.se with a plaintext protocol which has been explicitly disabled.
curl --proto -all,-http http://curl.se
The flaw is only present if the set of selected protocols disables the entire set of available protocols, in itself a command with no practical use and therefore unlikely to be encountered in real situations. The curl security team has thus assessed this to be low severity bug.
Impact
Requests can be sent on an unencrypted link even though the application explicitly disabled that.
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 an error in the logic that removes protocols from the allowed set, so the default set remained allowed.
Impact
Requests could be sent over an unencrypted link even though the application explicitly disabled that protocol; the curl security team assessed this as low severity because the required option combination has no practical use.
What the attacker needed
Curl invoked with an option that disables all protocols
How it was found
- Use the protocol selection option to disable all protocols without adding any.
- Observe that curl still performs a request using a plaintext protocol that was explicitly disabled.
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.
curl is a command-line tool for transferring data over the internet. It can use different 'protocols', which are rules for how data is sent, such as HTTP (plain text) or HTTPS (encrypted). This bug meant that if someone tried to turn off every protocol, curl would still allow the default ones, so a request could go out unencrypted even though it was meant to be blocked.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.