Skip to content
Misconfiguration Disclosed report Beginner

bypass of this Fixed #2437131 [ Inadequate Protocol Restriction Enforcement in curl ]

curl did not correctly enforce --proto restrictions, so a user who disabled all protocols except encrypted ones could still make plaintext HTTP requests.

hackeriron1 Follow

Originally disclosed on HackerOne

  • Disclosed after 31 hours

Summary:

A flaw has been identified in the curl command-line tool related to its protocol selection mechanism. Specifically, the protocol restrictions set by the --proto option can be bypassed, allowing unintended protocols to be used despite explicit restrictions. This flaw can result in plaintext communication being used even when the user has attempted to disable all protocols except encrypted ones.

##Vulnerability Details Command Triggering the Issue: curl --proto -all,-http http://example.com

##Observed Behavior: The command was intended to disable all protocols and then explicitly disable HTTP. However, the actual behavior allowed HTTP requests to be made, indicating that the protocol restrictions were not enforced correctly.

##Bypass Example:

    curl --proto =all http://example.com
    curl --proto http http://evil.com

The command curl --proto =all appears to override the protocol restrictions, allowing HTTP requests to bypass the intended restrictions.

##Steps to Reproduce Execute Command with Protocol Disabling:

curl --proto -all,-http http://example.com

Observe Error Message: Error: curl: (1) Protocol "http" disabled

Execute Bypass Command: curl --proto http http://evil.com

Observe Successful Request: The request is made over HTTP despite the initial restrictions.

##Potential Risks Security Breach: Users may believe they have enforced secure communication protocols, but the flaw could result in unencrypted communication, increasing the risk of eavesdropping or man-in-the-middle attacks. User Trust: Users trusting curl for secure communication may be misled by incorrect protocol enforcement.

##Mitigation Update curl: Ensure that you are using the latest version of curl, as this issue might be addressed in newer releases. Use Explicit Protocols: Instead of disabling protocols, explicitly specify the protocols you want to allow: curl --proto https https://example.com

##Recommendation Report to Maintainters: Consider reporting this issue to the curl maintainers if it has not been already reported. Provide them with detailed reproduction steps and observed behavior.

Impact

Summary:

Unencrypted Communication: The flaw allows requests to be made over unencrypted protocols (such as HTTP) even when the user has explicitly disabled plaintext protocols. Data Exposure Risk: This can lead to potential exposure of sensitive data if transmitted over an unencrypted link.

The original report as published on HackerOne, by hackeriron1. 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 protocol restriction logic did not correctly parse or apply the --proto option when a protocol was explicitly named after disabling all protocols.

Impact

Users who believe they have enforced encrypted-only communication could still send data over plaintext HTTP, increasing the risk of eavesdropping or man-in-the-middle attacks.

What the attacker needed

Ability to run curl with chosen options

The fix

The report suggests updating curl and explicitly specifying allowed protocols instead of relying on disabling protocols.

How it was found

  1. Run curl with --proto -all,-http against an HTTP URL.
  2. Observe the error that the http protocol is disabled.
  3. Run curl with --proto http against an HTTP URL.
  4. Observe that the request succeeds over HTTP despite the earlier restriction.

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 tool for transferring data over the internet. Its --proto option lets you say which protocols (such as HTTP or HTTPS) are allowed. This report says that option could be bypassed, so a request could still go over plain HTTP even when the user tried to block it, meaning data travels without encryption.

What is Misconfiguration?

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

More by hackeriron1

View all

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