2024-03-31 17:52:28 +08:00
|
|
|
<!--
|
|
|
|
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
|
|
|
|
|
|
SPDX-License-Identifier: curl
|
|
|
|
-->
|
|
|
|
|
2023-09-14 22:41:19 +08:00
|
|
|
# curl vulnerability disclosure policy
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2023-09-14 22:41:19 +08:00
|
|
|
This document describes how security vulnerabilities are handled in the curl
|
|
|
|
project.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2022-04-27 21:34:10 +08:00
|
|
|
## Publishing Information
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2014-10-10 16:50:23 +08:00
|
|
|
All known and public curl or libcurl related vulnerabilities are listed on
|
2020-11-04 21:02:01 +08:00
|
|
|
[the curl website security page](https://curl.se/docs/security.html).
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2019-04-20 18:19:47 +08:00
|
|
|
Security vulnerabilities **should not** be entered in the project's public bug
|
|
|
|
tracker.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2022-04-27 21:34:10 +08:00
|
|
|
## Vulnerability Handling
|
2013-10-29 06:19:55 +08:00
|
|
|
|
|
|
|
The typical process for handling a new security vulnerability is as follows.
|
|
|
|
|
|
|
|
No information should be made public about a vulnerability until it is
|
2022-01-27 09:12:50 +08:00
|
|
|
formally announced at the end of this process. That means, for example, that a
|
2024-02-27 14:48:10 +08:00
|
|
|
bug tracker entry must NOT be created to track the issue since that makes the
|
|
|
|
issue public and it should not be discussed on any of the project's public
|
2022-09-28 00:53:54 +08:00
|
|
|
mailing lists. Messages associated with any commits should not make any
|
2019-04-20 18:19:47 +08:00
|
|
|
reference to the security nature of the commit if done prior to the public
|
2013-10-29 06:19:55 +08:00
|
|
|
announcement.
|
|
|
|
|
2019-04-20 18:19:47 +08:00
|
|
|
- The person discovering the issue, the reporter, reports the vulnerability on
|
2022-09-21 05:30:19 +08:00
|
|
|
[HackerOne](https://hackerone.com/curl). Issues filed there reach a handful
|
|
|
|
of selected and trusted people.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
|
|
|
- Messages that do not relate to the reporting or managing of an undisclosed
|
|
|
|
security vulnerability in curl or libcurl are ignored and no further action
|
|
|
|
is required.
|
|
|
|
|
2019-04-20 18:19:47 +08:00
|
|
|
- A person in the security team responds to the original report to acknowledge
|
|
|
|
that a human has seen the report.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
|
|
|
- The security team investigates the report and either rejects it or accepts
|
2022-04-27 21:34:10 +08:00
|
|
|
it. See below for examples of problems that are not considered
|
|
|
|
vulnerabilities.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
|
|
|
- If the report is rejected, the team writes to the reporter to explain why.
|
|
|
|
|
2022-07-27 19:52:53 +08:00
|
|
|
- If the report is accepted, the team writes to the reporter to let them
|
2013-10-29 06:19:55 +08:00
|
|
|
know it is accepted and that they are working on a fix.
|
|
|
|
|
|
|
|
- The security team discusses the problem, works out a fix, considers the
|
|
|
|
impact of the problem and suggests a release schedule. This discussion
|
|
|
|
should involve the reporter as much as possible.
|
|
|
|
|
|
|
|
- The release of the information should be "as soon as possible" and is most
|
2019-04-20 18:19:47 +08:00
|
|
|
often synchronized with an upcoming release that contains the fix. If the
|
|
|
|
reporter, or anyone else involved, thinks the next planned release is too
|
|
|
|
far away, then a separate earlier release should be considered.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
|
|
|
- Write a security advisory draft about the problem that explains what the
|
2018-03-14 21:20:24 +08:00
|
|
|
problem is, its impact, which versions it affects, solutions or workarounds,
|
|
|
|
when the release is out and make sure to credit all contributors properly.
|
2023-05-08 00:33:57 +08:00
|
|
|
Figure out the CWE (Common Weakness Enumeration) number for the flaw. See
|
2023-08-02 05:38:16 +08:00
|
|
|
[SECURITY-ADVISORY](https://curl.se/dev/advisory.html) for help on creating
|
|
|
|
the advisory.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2024-03-08 18:09:48 +08:00
|
|
|
- Request a CVE Id for the issue. curl is a CNA (CVE Numbering Authority) and
|
|
|
|
can request its own numbers.
|
2019-04-20 18:19:47 +08:00
|
|
|
|
2013-10-29 06:19:55 +08:00
|
|
|
- Update the "security advisory" with the CVE number.
|
|
|
|
|
|
|
|
- The security team commits the fix in a private branch. The commit message
|
2023-03-09 20:39:23 +08:00
|
|
|
should ideally contain the CVE number. If the severity level of the issue is
|
|
|
|
set to Low or Medium, the fix is allowed to get merged into the master
|
|
|
|
repository via a normal PR - but without mentioning it being a security
|
|
|
|
vulnerability.
|
|
|
|
|
|
|
|
- The monetary reward part of the bug-bounty is managed by the Internet Bug
|
|
|
|
Bounty team and the reporter is asked to request the reward from them after
|
|
|
|
the issue has been completely handled and published by curl.
|
2021-09-13 16:23:50 +08:00
|
|
|
|
|
|
|
- No more than 10 days before release, inform
|
|
|
|
[distros@openwall](https://oss-security.openwall.org/wiki/mailing-lists/distros)
|
|
|
|
to prepare them about the upcoming public security vulnerability
|
|
|
|
announcement - attach the advisory draft for information with CVE and
|
|
|
|
current patch. 'distros' does not accept an embargo longer than 14 days and
|
|
|
|
they do not care for Windows-specific flaws.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
2016-10-27 16:21:52 +08:00
|
|
|
- No more than 48 hours before the release, the private branch is merged into
|
|
|
|
the master branch and pushed. Once pushed, the information is accessible to
|
|
|
|
the public and the actual release should follow suit immediately afterwards.
|
|
|
|
The time between the push and the release is used for final tests and
|
|
|
|
reviews.
|
2013-10-29 06:19:55 +08:00
|
|
|
|
|
|
|
- The project team creates a release that includes the fix.
|
|
|
|
|
|
|
|
- The project team announces the release and the vulnerability to the world in
|
|
|
|
the same manner we always announce releases. It gets sent to the
|
|
|
|
curl-announce, curl-library and curl-users mailing lists.
|
|
|
|
|
2024-01-23 22:12:09 +08:00
|
|
|
- The security webpage on the website should get the new vulnerability
|
2013-10-29 06:19:55 +08:00
|
|
|
mentioned.
|
|
|
|
|
2022-04-27 21:34:10 +08:00
|
|
|
## security (at curl dot se)
|
2014-09-08 15:39:14 +08:00
|
|
|
|
2019-04-20 18:19:47 +08:00
|
|
|
This is a private mailing list for discussions on and about curl security
|
|
|
|
issues.
|
|
|
|
|
2014-09-08 15:39:14 +08:00
|
|
|
Who is on this list? There are a couple of criteria you must meet, and then we
|
2021-10-31 23:34:44 +08:00
|
|
|
might ask you to join the list or you can ask to join it. It really is not a
|
2021-11-01 20:43:11 +08:00
|
|
|
formal process. We basically only require that you have a long-term presence
|
|
|
|
in the curl project and you have shown an understanding for the project and
|
2021-10-31 23:34:44 +08:00
|
|
|
its way of working. You must have been around for a good while and you should
|
2022-01-27 09:12:50 +08:00
|
|
|
have no plans of vanishing in the near future.
|
2014-09-08 15:39:14 +08:00
|
|
|
|
2016-11-15 17:47:07 +08:00
|
|
|
We do not make the list of participants public mostly because it tends to vary
|
2024-02-27 14:48:10 +08:00
|
|
|
somewhat over time and a list somewhere only risks getting outdated.
|
2018-03-14 21:20:24 +08:00
|
|
|
|
2022-04-27 21:34:10 +08:00
|
|
|
## Publishing Security Advisories
|
2018-03-14 21:20:24 +08:00
|
|
|
|
|
|
|
1. Write up the security advisory, using markdown syntax. Use the same
|
|
|
|
subtitles as last time to maintain consistency.
|
|
|
|
|
2018-08-20 17:49:58 +08:00
|
|
|
2. Name the advisory file after the allocated CVE id.
|
2018-03-14 21:20:24 +08:00
|
|
|
|
2022-09-21 05:30:19 +08:00
|
|
|
3. Add a line on the top of the array in `curl-www/docs/vuln.pm`.
|
2018-03-14 21:20:24 +08:00
|
|
|
|
2022-09-21 05:30:19 +08:00
|
|
|
4. Put the new advisory markdown file in the `curl-www/docs/` directory. Add it
|
2022-04-27 21:34:10 +08:00
|
|
|
to the git repository.
|
2018-03-14 21:20:24 +08:00
|
|
|
|
|
|
|
5. Run `make` in your local web checkout and verify that things look fine.
|
|
|
|
|
|
|
|
6. On security advisory release day, push the changes on the curl-www
|
|
|
|
repository's remote master branch.
|
2018-07-12 18:32:54 +08:00
|
|
|
|
2022-09-21 05:30:19 +08:00
|
|
|
## HackerOne
|
2020-12-03 21:18:51 +08:00
|
|
|
|
|
|
|
Request the issue to be disclosed. If there are sensitive details present in
|
|
|
|
the report and discussion, those should be redacted from the disclosure. The
|
|
|
|
default policy is to disclose as much as possible as soon as the vulnerability
|
|
|
|
has been published.
|
|
|
|
|
2022-04-27 21:34:10 +08:00
|
|
|
## Bug Bounty
|
2018-09-22 05:21:30 +08:00
|
|
|
|
2020-11-04 21:02:01 +08:00
|
|
|
See [BUG-BOUNTY](https://curl.se/docs/bugbounty.html) for details on the
|
2019-05-11 23:50:37 +08:00
|
|
|
bug bounty program.
|
2022-04-27 21:34:10 +08:00
|
|
|
|
2022-12-20 01:04:11 +08:00
|
|
|
# Severity levels
|
|
|
|
|
|
|
|
The curl project's security team rates security problems using four severity
|
|
|
|
levels depending how serious we consider the problem to be. We use **Low**,
|
|
|
|
**Medium**, **High** and **Critical**. We refrain from using numerical scoring
|
|
|
|
of vulnerabilities.
|
|
|
|
|
|
|
|
When deciding severity level on a particular issue, we take all the factors
|
|
|
|
into account: attack vector, attack complexity, required privileges, necessary
|
|
|
|
build configuration, protocols involved, platform specifics and also what
|
|
|
|
effects a possible exploit or trigger of the issue can lead do, including
|
|
|
|
confidentiality, integrity or availability problems.
|
|
|
|
|
|
|
|
## Low
|
|
|
|
|
|
|
|
This is a security problem that is truly hard or unlikely to exploit or
|
|
|
|
trigger. Due to timing, platform requirements or the fact that options or
|
|
|
|
protocols involved are rare etc. [Past
|
|
|
|
example](https://curl.se/docs/CVE-2022-43552.html)
|
|
|
|
|
|
|
|
## Medium
|
|
|
|
|
|
|
|
This is a security problem that is less hard than **Low** to exploit or
|
|
|
|
trigger. Less strict timing, wider platforms availability or involving more
|
|
|
|
widely used options or protocols. A problem that usually needs something else
|
|
|
|
to also happen to become serious. [Past
|
|
|
|
example](https://curl.se/docs/CVE-2022-32206.html)
|
|
|
|
|
|
|
|
## High
|
|
|
|
|
|
|
|
This issue in itself a serious problem with real world impact. Flaws that can
|
|
|
|
easily compromise the confidentiality, integrity or availability of resources.
|
|
|
|
Exploiting or triggering this problem is not hard. [Past
|
|
|
|
example](https://curl.se/docs/CVE-2019-3822.html)
|
|
|
|
|
|
|
|
## Critical
|
|
|
|
|
|
|
|
Easily exploitable by a remote unauthenticated attacker and lead to system
|
|
|
|
compromise (arbitrary code execution) without requiring user interaction, with
|
|
|
|
a common configuration on a popular platform. This issue has few restrictions
|
|
|
|
and requirements and can be exploited easily using most curl configurations.
|
2023-06-03 00:05:22 +08:00
|
|
|
[Past example](https://curl.se/docs/CVE-2000-0973.html)
|
2022-12-20 01:04:11 +08:00
|
|
|
|
2022-04-27 21:34:10 +08:00
|
|
|
# Not security issues
|
|
|
|
|
|
|
|
This is an incomplete list of issues that are not considered vulnerabilities.
|
|
|
|
|
|
|
|
## Small memory leaks
|
|
|
|
|
|
|
|
We do not consider a small memory leak a security problem; even if the amount
|
|
|
|
of allocated memory grows by a small amount every now and then. Long-living
|
|
|
|
applications and services already need to have counter-measures and deal with
|
|
|
|
growing memory usage, be it leaks or just increased use. A small memory or
|
|
|
|
resource leak is then expected to *not* cause a security problem.
|
|
|
|
|
|
|
|
Of course there can be a discussion if a leak is small or not. A large leak
|
|
|
|
can be considered a security problem due to the DOS risk. If leaked memory
|
|
|
|
contains sensitive data it might also qualify as a security problem.
|
|
|
|
|
|
|
|
## Never-ending transfers
|
|
|
|
|
|
|
|
We do not consider flaws that cause a transfer to never end to be a security
|
|
|
|
problem. There are already several benign and likely reasons for transfers to
|
|
|
|
stall and never end, so applications that cannot deal with never-ending
|
|
|
|
transfers already need to have counter-measures established.
|
|
|
|
|
|
|
|
If the problem avoids the regular counter-measures when it causes a never-
|
2022-09-19 23:30:30 +08:00
|
|
|
ending transfer, it might be a security problem.
|
2022-04-27 21:34:10 +08:00
|
|
|
|
|
|
|
## Not practically possible
|
|
|
|
|
|
|
|
If the flaw or vulnerability cannot practically get executed on existing
|
|
|
|
hardware it is not a security problem.
|
|
|
|
|
|
|
|
## API misuse
|
|
|
|
|
|
|
|
If a reported issue only triggers by an application using the API in a way
|
|
|
|
that is not documented to work or even documented to not work, it is probably
|
|
|
|
not going to be considered a security problem. We only guarantee secure and
|
|
|
|
proper functionality when the APIs are used as expected and documented.
|
|
|
|
|
|
|
|
There can be a discussion about what the documentation actually means and how
|
|
|
|
to interpret the text, which might end up with us still agreeing that it is a
|
|
|
|
security problem.
|
|
|
|
|
|
|
|
## Local attackers already present
|
|
|
|
|
|
|
|
When an issue can only be attacked or misused by an attacker present on the
|
|
|
|
local system or network, the bar is raised. If a local user wrongfully has
|
|
|
|
elevated rights on your system enough to attack curl, they can probably
|
|
|
|
already do much worse harm and the problem is not really in curl.
|
|
|
|
|
|
|
|
## Experiments
|
|
|
|
|
|
|
|
Vulnerabilities in features which are off by default (in the build) and
|
|
|
|
documented as experimental, are not eligible for a reward and we do not
|
|
|
|
consider them security problems.
|
2022-05-03 14:50:10 +08:00
|
|
|
|
|
|
|
## URL inconsistencies
|
|
|
|
|
|
|
|
URL parser inconsistencies between browsers and curl are expected and are not
|
|
|
|
considered security vulnerabilities. The WHATWG URL Specification and RFC
|
|
|
|
3986+ (the plus meaning that it is an extended version) [are not completely
|
|
|
|
interoperable](https://github.com/bagder/docs/blob/master/URL-interop.md).
|
|
|
|
|
|
|
|
Obvious parser bugs can still be vulnerabilities of course.
|
2022-05-03 19:37:04 +08:00
|
|
|
|
|
|
|
## Visible command line arguments
|
|
|
|
|
|
|
|
The curl command blanks the contents of a number of command line arguments to
|
|
|
|
prevent them from appearing in process listings. It does not blank all
|
|
|
|
arguments even if some of them that are not blanked might contain sensitive
|
|
|
|
data. We consider this functionality a best-effort and omissions are not
|
|
|
|
security vulnerabilities.
|
|
|
|
|
|
|
|
- not all systems allow the arguments to be blanked in the first place
|
2024-02-27 14:48:10 +08:00
|
|
|
- since curl blanks the argument itself they area readable for a short moment
|
|
|
|
no matter what
|
2022-05-03 19:37:04 +08:00
|
|
|
- virtually every argument can contain sensitive data, depending on use
|
|
|
|
- blanking all arguments would make it impractical for users to differentiate
|
|
|
|
curl command lines in process listings
|
2023-03-18 07:08:13 +08:00
|
|
|
|
|
|
|
## Busy-loops
|
|
|
|
|
|
|
|
Busy-loops that consume 100% CPU time but eventually end (perhaps due to a set
|
|
|
|
timeout value or otherwise) are not considered security problems. Applications
|
|
|
|
are supposed to already handle situations when the transfer loop legitimately
|
|
|
|
consumes 100% CPU time, so while a prolonged such busy-loop is a nasty bug, we
|
|
|
|
do not consider it a security problem.
|
2023-08-21 15:37:08 +08:00
|
|
|
|
|
|
|
## Saving files
|
|
|
|
|
|
|
|
curl cannot protect against attacks where an attacker has write access to the
|
|
|
|
same directory where curl is directed to save files.
|
2023-08-29 19:24:06 +08:00
|
|
|
|
|
|
|
## Tricking a user to run a command line
|
|
|
|
|
|
|
|
A creative, misleading or funny looking command line is not a security
|
|
|
|
problem. The curl command line tool takes options and URLs on the command line
|
|
|
|
and if an attacker can trick the user to run a specifically crafted curl
|
|
|
|
command line, all bets are off. Such an attacker can just as well have the
|
|
|
|
user run a much worse command that can do something fatal (like
|
|
|
|
`sudo rm -rf /`).
|
2023-11-06 15:39:29 +08:00
|
|
|
|
|
|
|
## Terminal output and escape sequences
|
|
|
|
|
|
|
|
Content that is transferred from a server and gets displayed in a terminal by
|
|
|
|
curl may contain escape sequences or use other tricks to fool the user. This
|
|
|
|
is curl working as designed and is not a curl security problem. Escape
|
|
|
|
sequences, moving cursor, changing color etc, is also frequently used for
|
|
|
|
good. To reduce the risk of getting fooled, save files and browse them after
|
|
|
|
download using a display method that minimizes risks.
|