Default Minimum TLS Version Set to TLS v1.0 (Cryptographic Weakness)
Curl's default TLS version setting does not enforce a minimum above TLS v1.0 when built with older OpenSSL libraries, so connections may negotiate the outdated TLS v1.0 protocol. An attacker could then exploit weaknesses such as BEAST to read or alter data in transit.
Originally disclosed on HackerOne
- Disclosed after 3 hours
Summary:
Curl sets TLS v1.0 as the default minimum version, which is outdated and vulnerable to attacks like BEAST, posing a risk to data integrity and confidentiality. This was found through manual code review. No AI was used in identifying the issue or generating this report.
Affected Version: Version: 8.15.0-DEV (from source code in https://github.com/curl/curl, commit at time of review). Platform: Any using curl with an older OpenSSL version that doesn't enforce a stricter minimum. Output of curl -V not applicable as this is a source code issue.
Steps To Reproduce:
- Check out the file
./docs/libcurl/opts/CURLOPT_SSLVERSION.md. You'll see in the documentation that curl sets TLS v1.0 as the default minimum version (since version 7.39.0) when using theCURL_SSLVERSION_DEFAULToption, unless the TLS library you're using forces a higher version. - In the same GitHub repo, open the file
./lib/vtls/openssl.cand search forCURL_SSLVERSION_DEFAULT. You'll notice that when this default setting is used, curl doesn't set a specific minimum TLS version and just goes with whatever the OpenSSL library defaults to. This can be as low as TLS v1.0 if you're using an older version of OpenSSL. - Now, if you build curl with an older OpenSSL version (like anything before 1.1.0) that defaults to TLS v1.0, or just use the
CURL_SSLVERSION_DEFAULTsetting without changing it, curl can end up making connections with TLS v1.0. This is a problem because TLS v1.0 is vulnerable to attacks like BEAST. This can put your data at risk. - Want to see the danger? Set up curl to connect to a server that allows TLS v1.0, like a test server or using
openssl s_server. With default settings or an old OpenSSL library, curl will drop to TLS v1.0. An attacker can then exploit this weak connection to snoop on or mess with the data.
Supporting Material/References:
./docs/libcurl/opts/CURLOPT_SSLVERSION.md(documentation of default TLS v1.0 minimum)../lib/vtls/openssl.c(code handlingCURL_SSLVERSION_DEFAULTwithout enforcing a higher minimum).
Impact
Summary: An attacker can crack TLS v1.0 using attacks like BEAST to steal data or mess with connections. This happens if curl uses an older OpenSSL library or sticks to the default minimum version. It puts sensitive info at risk on HTTPS/FTPS links, especially for users who don’t know about this default.
Context
curl is a command-line tool and library for transferring data with URLs. When a caller does not pin a TLS version, curl has to decide which minimum protocol version it will accept. That decision is exposed through the CURL_SSLVERSION_DEFAULT option and documented in the libcurl option reference.
The report is about that default. The researcher argues that curl's default minimum is TLS v1.0, a protocol version with known cryptographic weaknesses, and that the default therefore allows connections that should not be possible unless the caller explicitly asks for them.
The affected asset is the curl source repository, and the version reviewed was 8.15.0-DEV at the commit current at the time of review. The report notes that the issue is a source code issue, so the output of curl -V is not applicable.
Setup
The finding came from manual code review, and the report states that no AI was used to identify the issue or to generate the report. No accounts, roles or special tooling are involved: the only material needed is a checkout of the curl source tree and the ability to read two files in it.
The precondition that matters for the impact is the TLS backend. The behaviour described applies to builds that use OpenSSL, and specifically to builds where the OpenSSL library does not itself enforce a stricter minimum. The report names OpenSSL versions before 1.1.0 as an example of libraries that default to TLS v1.0.
Finding it
The researcher checked the documentation for CURLOPT_SSLVERSION and the OpenSSL backend implementation. Two things stood out:
- The documentation states that curl sets TLS v1.0 as the default minimum version (since version 7.39.0) when
CURL_SSLVERSION_DEFAULTis used, unless the TLS library in use forces a higher version. - In the OpenSSL backend, the
CURL_SSLVERSION_DEFAULTpath does not set a specific minimum TLS version at all. It leaves the choice to whatever the OpenSSL library defaults to.
That combination means the effective floor is not decided by curl but by the linked OpenSSL build. On a modern OpenSSL the floor may be acceptable; on an older one it can be TLS v1.0. The effective floor is decided by the linked OpenSSL build rather than by curl.
Exploitation
Step 1: read the documented default
Check out the file ./docs/libcurl/opts/CURLOPT_SSLVERSION.md. The documentation shows that curl sets TLS v1.0 as the default minimum version (since version 7.39.0) when the CURL_SSLVERSION_DEFAULT option is used, unless the TLS library being used forces a higher version.
This is the contract a caller reads before deciding whether to pin a version. It says the floor is TLS v1.0 and that only the TLS library can raise it.
Step 2: read the implementation
In the same repository, open ./lib/vtls/openssl.c and search for CURL_SSLVERSION_DEFAULT. When the default setting is used, curl does not set a specific minimum TLS version and simply goes with whatever the OpenSSL library defaults to. That can be as low as TLS v1.0 when an older OpenSSL is in use.
The important part is the absence of a minimum-version assignment on this path: the code does not translate the default into a concrete floor, so the floor is inherited from the library.
Step 3: build with an older OpenSSL
If curl is built with an older OpenSSL version, such as anything before 1.1.0, that defaults to TLS v1.0, or if the CURL_SSLVERSION_DEFAULT setting is simply left unchanged, curl can end up making connections with TLS v1.0. TLS v1.0 is vulnerable to attacks such as BEAST, which puts the data on the connection at risk.
Step 4: observe the downgrade
To see the behaviour, point curl at a server that allows TLS v1.0, for example a test server or one started with openssl s_server. With default settings or an old OpenSSL library, curl will drop to TLS v1.0. An attacker can then exploit that weak connection to snoop on or modify the data.
The report does not include the exact command lines or captured handshake output for this step.
Root cause
When CURL_SSLVERSION_DEFAULT is used, the OpenSSL backend sets no minimum version and leaves the choice to the library. CURL_SSLVERSION_DEFAULT is documented as meaning a TLS v1.0 minimum, and the OpenSSL backend implements it by not setting a minimum at all, delegating the decision to the linked library. The effective security floor therefore depends on the OpenSSL build rather than on curl, and on older libraries that floor is TLS v1.0.
The report scopes the issue to TLS libraries that do not enforce a stricter minimum. A caller who never touches the option gets whatever the build provides.
Impact
An attacker can attack a TLS v1.0 connection using techniques such as BEAST to steal data or interfere with the connection. This applies when curl is built against an older OpenSSL library or when the default minimum version is left in place. Sensitive information on HTTPS and FTPS connections is at risk, particularly for users who are not aware of the default.
The report does not demonstrate a specific attack against a specific deployment; the impact is stated in terms of the conditions above.
Fix
The report does not describe a fix or a change made in response.
Variants to test
- Review other TLS backends for the same pattern: search each backend for the default-version branch and check whether it assigns a concrete minimum or delegates to the library. A positive result is a default path with no minimum-version assignment.
- Compare documentation against implementation for every version-pinning option. A positive result is a documented floor that the code does not enforce.
- Check builds against older library versions, not just current ones. A positive result is a connection that negotiates TLS v1.0 with default settings against a server that permits it.
- Look at other projects that wrap OpenSSL and expose a "default" TLS version option. A positive result is the same delegation, where the effective floor is whatever the linked library chooses.
Hunting notes
This kind of bug hides in the boundary between a library's documented default and the backend that implements it, especially where a project supports several TLS libraries and each backend handles the default differently. During review, the signal is a default branch that contains no explicit minimum-version call, combined with documentation that promises a specific floor.
The report states the impact in terms of an older OpenSSL library or the default minimum being left in place. That framing, a documented default, the code path that fails to enforce it, and the conditions under which the weak version is actually negotiated, is what makes the issue actionable for a maintainer.
What happened, in plain words
curl is a small program, and also a piece of software that many other programs use, for fetching things over the internet: web pages, files, API responses. Almost every time you load a secure website (one whose address starts with https://), the connection is protected by a set of rules called TLS. TLS is what puts the padlock in your browser and scrambles the data so that nobody sitting between you and the website can read it.
TLS has had several versions over the years. Newer versions fix weaknesses found in older ones. TLS v1.0 is a very old version, and it has a known weakness called BEAST that can, under the right conditions, let an attacker peek at or tamper with data on the connection.
This report says that curl, when the person using it does not ask for a particular TLS version, can end up accepting TLS v1.0. The researcher found this by reading curl's source code (the human-written instructions that make up the program) and its documentation, not by attacking a live system. The report states that no AI was used to find the issue or to write it up.
The important nuance is that curl itself does not always pick the version. For one of the libraries it can be built with, OpenSSL, curl simply leaves the choice to that library. If the library is old enough, its own default is TLS v1.0, and so curl inherits that weak floor without anyone asking for it.
Some background you need first
Before the steps make sense, a few ideas need to be clear.
What curl is. curl is a command-line tool: you type a command in a terminal (the text window where you type commands instead of clicking) and it fetches a URL for you. It is also a library, meaning other programs can include curl's code and use its abilities without running the curl command at all. FTPS is the secure version of FTP, an older way of transferring files.
What TLS is. When your browser or curl connects to a secure server, the two sides first agree on how to scramble the traffic. That agreement is the TLS handshake. Part of the agreement is the version: both sides must support a version in common, and they pick one. A minimum version is a floor: the lowest version the client is willing to accept. If the floor is TLS v1.0, then a server that only speaks TLS v1.0 is still acceptable, and the connection goes ahead on that weak version.
What OpenSSL is. OpenSSL is a widely used library that actually performs the TLS scrambling. curl does not do the cryptography itself; it hands that job to a library like OpenSSL. Which library curl uses is called its TLS backend. Different backends can behave differently, and the report focuses on the OpenSSL one.
What a default is. Many settings have a value that applies when the user says nothing. That is the default. A safe default protects people who never think about the setting; an unsafe default quietly exposes them.
What BEAST is. BEAST is the name of a known attack against TLS v1.0. The report describes its effect as letting an attacker snoop on or mess with the data on a weak connection. You do not need the details to follow the report; what matters is that TLS v1.0 is considered risky and newer versions exist.
What a source code issue means. Some problems can be seen by running a program and looking at its output. This one cannot: it lives in how the code is written, so the report says the output of curl -V (a command that prints curl's version information) is not applicable.
The setup
The researcher needed no accounts, no special tools and no permission on a live system. The only material was a copy of curl's source code and the ability to read two files inside it. This is called manual code review: a person reading code carefully, looking for mistakes.
The one condition that matters for the impact is which TLS library curl was built against. The behaviour described applies to builds that use OpenSSL, and specifically to builds where that OpenSSL does not itself insist on a newer minimum. The report gives OpenSSL versions before 1.1.0 as an example of libraries whose own default is TLS v1.0.
Finding it
The researcher read the documentation for a curl setting called CURLOPT_SSLVERSION and the code that implements it for OpenSSL. Two things stood out:
- The documentation says curl sets TLS v1.0 as the default minimum version (since curl version 7.39.0) when the
CURL_SSLVERSION_DEFAULToption is used, unless the TLS library in use forces a higher version. - In the OpenSSL backend, the
CURL_SSLVERSION_DEFAULTpath does not set a specific minimum TLS version at all. It leaves the choice to whatever OpenSSL defaults to.
So the real floor is not decided by curl but by the OpenSSL build it was linked against. On a modern OpenSSL the floor may be fine; on an older one it can be TLS v1.0.
Walking through the steps
Step 1: read the documented default
Open the file ./docs/libcurl/opts/CURLOPT_SSLVERSION.md in the curl source tree. The documentation shows that curl sets TLS v1.0 as the default minimum version (since version 7.39.0) when the CURL_SSLVERSION_DEFAULT option is used, unless the TLS library being used forces a higher version.
Why this step: documentation is the promise made to whoever uses curl. A programmer reads it to decide whether they need to change anything. Here it tells them the floor is TLS v1.0 and that only the TLS library can raise it.
Step 2: read the implementation
In the same repository, open ./lib/vtls/openssl.c and search for CURL_SSLVERSION_DEFAULT. When the default setting is used, curl does not set a specific minimum TLS version and simply goes with whatever the OpenSSL library defaults to. That can be as low as TLS v1.0 when an older OpenSSL is in use.
Why this step: the code is what actually runs, so it is the truth behind the documentation. The key detail is what is missing: on this path the code never translates the default into a concrete floor, so the floor is inherited from the library instead.
Step 3: build with an older OpenSSL
If curl is built with an older OpenSSL version, such as anything before 1.1.0, that defaults to TLS v1.0, or if the CURL_SSLVERSION_DEFAULT setting is simply left unchanged, curl can end up making connections with TLS v1.0. TLS v1.0 is vulnerable to attacks such as BEAST, which puts the data on the connection at risk.
Why this step: it turns the code reading into a concrete situation. Building means compiling curl from its source together with a chosen OpenSSL. Pair an old library with the untouched default and the weak version becomes possible.
Step 4: observe the downgrade
To see the behaviour, point curl at a server that allows TLS v1.0, for example a test server or one started with openssl s_server. With default settings or an old OpenSSL library, curl will drop to TLS v1.0. An attacker can then exploit that weak connection to snoop on or modify the data.
Why this step: it demonstrates the result rather than only arguing it. A downgrade here means the connection settles on the older, weaker version instead of a newer one. The report does not include the exact command lines or captured handshake output for this step.
Why it happens
When CURL_SSLVERSION_DEFAULT is used, the OpenSSL backend sets no minimum version and hands the decision to the linked library. CURL_SSLVERSION_DEFAULT is documented as meaning a TLS v1.0 minimum, and the OpenSSL backend implements it by not setting a minimum at all, handing the decision to the linked library. The effective security floor therefore depends on the OpenSSL build rather than on curl, and on older libraries that floor is TLS v1.0.
The report explicitly limits the issue to libraries that do not enforce a stricter minimum. Anyone who never touches the option gets whatever their build provides.
What an attacker could do
An attacker can attack a TLS v1.0 connection using techniques such as BEAST to steal data or interfere with the connection. This applies when curl is built against an older OpenSSL library or when the default minimum version is left in place. Sensitive information on HTTPS and FTPS connections is at risk, particularly for users who are not aware of the default.
The report does not demonstrate a specific attack against a specific deployment; the impact is stated in terms of those conditions.
Was it fixed?
The report does not describe a fix or a change made in response.
Similar places to look
- Review other TLS backends for the same pattern: search each backend for the default-version branch and check whether it assigns a concrete minimum or delegates to the library. A positive result is a default path with no minimum-version assignment.
- Compare documentation against implementation for every version-pinning option. A positive result is a documented floor that the code does not enforce.
- Check builds against older library versions, not just current ones. A positive result is a connection that negotiates TLS v1.0 with default settings against a server that permits it.
- Look at other projects that wrap OpenSSL and expose a "default" TLS version option. A positive result is the same delegation, where the effective floor is whatever the linked library chooses.
Notes for anyone hunting this kind of bug
This kind of bug hides in the boundary between a library's documented default and the backend that implements it, especially where a project supports several TLS libraries and each backend handles the default differently. During review, the signal is a default branch that contains no explicit minimum-version call, combined with documentation that promises a specific floor.
The report states the impact in terms of an older OpenSSL library or the default minimum being left in place. That framing, a documented default, the code path that fails to enforce it, and the conditions under which the weak version is actually negotiated, is what makes the issue actionable for a maintainer.
Glossary
- curl: a command-line tool and library for transferring data with URLs; also the library many applications use for HTTPS and FTPS traffic.
- Library: a collection of code that other programs can include and reuse instead of writing it themselves.
- Command-line tool: a program you run by typing a command in a terminal rather than by clicking in a window.
- Terminal: the text window where you type commands.
- URL: the address of something on the internet, such as a web page or file.
- HTTPS: the secure version of the protocol used to load web pages, protected by TLS.
- FTPS: the secure version of FTP, an older protocol for transferring files.
- TLS: the set of rules that scrambles and protects a connection between a client and a server.
- TLS version: a numbered revision of TLS; newer versions fix weaknesses in older ones.
- TLS v1.0: a very old TLS version with known weaknesses, including exposure to the BEAST attack.
- Minimum version: the lowest TLS version a client is willing to accept on a connection.
- TLS handshake: the opening exchange in which client and server agree how to protect the connection, including which version to use.
- Downgrade: a connection settling on an older, weaker version than the newest available.
- OpenSSL: a widely used library that performs TLS cryptography on behalf of programs such as curl.
- TLS backend: the part of a program that hands TLS work to a particular library; curl has one for OpenSSL and others for other libraries.
- Default: the value a setting takes when the user does not specify one.
CURLOPT_SSLVERSION: the curl option that controls which TLS version is used.CURL_SSLVERSION_DEFAULT: the value of that option meaning "use the default", which the report says leaves the minimum to the TLS library.- BEAST: a known attack against TLS v1.0 that the report says can be used to steal data or interfere with a connection.
- Source code: the human-written instructions that make up a program.
- Manual code review: a person reading source code carefully to find mistakes, as opposed to running automated tools.
- Build: the process of turning source code into a working program, including choosing which libraries it is linked against.
- Commit: a saved snapshot of a code repository at a particular point in time.
curl -V: a curl command that prints version information; the report says it is not applicable here because the issue is in the source code.openssl s_server: a command from OpenSSL that starts a test TLS server, mentioned in the report as a way to observe the behaviour.- Version pinning: explicitly choosing a fixed version instead of accepting a default.
- Cryptographic weakness: a flaw in the maths or design used to protect data, which can make the protection breakable.