xref: /curl/docs/VULN-DISCLOSURE-POLICY.md (revision cfb97e1f)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7# curl vulnerability disclosure policy
8
9This document describes how security vulnerabilities are handled in the curl
10project.
11
12## Publishing Information
13
14All known and public curl or libcurl related vulnerabilities are listed on
15[the curl website security page](https://curl.se/docs/security.html).
16
17Security vulnerabilities **should not** be entered in the project's public bug
18tracker.
19
20## Vulnerability Handling
21
22The typical process for handling a new security vulnerability is as follows.
23
24No information should be made public about a vulnerability until it is
25formally announced at the end of this process. That means, for example, that a
26bug tracker entry must NOT be created to track the issue since that makes the
27issue public and it should not be discussed on any of the project's public
28mailing lists. Messages associated with any commits should not make any
29reference to the security nature of the commit if done prior to the public
30announcement.
31
32- The person discovering the issue, the reporter, reports the vulnerability on
33  [HackerOne](https://hackerone.com/curl). Issues filed there reach a handful
34  of selected and trusted people.
35
36- Messages that do not relate to the reporting or managing of an undisclosed
37  security vulnerability in curl or libcurl are ignored and no further action
38  is required.
39
40- A person in the security team responds to the original report to acknowledge
41  that a human has seen the report.
42
43- The security team investigates the report and either rejects it or accepts
44  it. See below for examples of problems that are not considered
45  vulnerabilities.
46
47- If the report is rejected, the team writes to the reporter to explain why.
48
49- If the report is accepted, the team writes to the reporter to let them
50  know it is accepted and that they are working on a fix.
51
52- The security team discusses the problem, works out a fix, considers the
53  impact of the problem and suggests a release schedule. This discussion
54  should involve the reporter as much as possible.
55
56- The release of the information should be "as soon as possible" and is most
57  often synchronized with an upcoming release that contains the fix. If the
58  reporter, or anyone else involved, thinks the next planned release is too
59  far away, then a separate earlier release should be considered.
60
61- Write a security advisory draft about the problem that explains what the
62  problem is, its impact, which versions it affects, solutions or workarounds,
63  when the release is out and make sure to credit all contributors properly.
64  Figure out the CWE (Common Weakness Enumeration) number for the flaw. See
65  [SECURITY-ADVISORY](https://curl.se/dev/advisory.html) for help on creating
66  the advisory.
67
68- Request a CVE Id for the issue. curl is a CNA (CVE Numbering Authority) and
69  can request its own numbers.
70
71- Update the "security advisory" with the CVE number.
72
73- The security team commits the fix in a private branch. The commit message
74  should ideally contain the CVE number. If the severity level of the issue is
75  set to Low or Medium, the fix is allowed to get merged into the master
76  repository via a normal PR - but without mentioning it being a security
77  vulnerability.
78
79- The monetary reward part of the bug-bounty is managed by the Internet Bug
80  Bounty team and the reporter is asked to request the reward from them after
81  the issue has been completely handled and published by curl.
82
83- No more than 10 days before release, inform
84  [distros@openwall](https://oss-security.openwall.org/wiki/mailing-lists/distros)
85  to prepare them about the upcoming public security vulnerability
86  announcement - attach the advisory draft for information with CVE and
87  current patch. 'distros' does not accept an embargo longer than 14 days and
88  they do not care for Windows-specific flaws.
89
90- No more than 48 hours before the release, the private branch is merged into
91  the master branch and pushed. Once pushed, the information is accessible to
92  the public and the actual release should follow suit immediately afterwards.
93  The time between the push and the release is used for final tests and
94  reviews.
95
96- The project team creates a release that includes the fix.
97
98- The project team announces the release and the vulnerability to the world in
99  the same manner we always announce releases. It gets sent to the
100  curl-announce, curl-library and curl-users mailing lists.
101
102- The security webpage on the website should get the new vulnerability
103  mentioned.
104
105## security (at curl dot se)
106
107This is a private mailing list for discussions on and about curl security
108issues.
109
110Who is on this list? There are a couple of criteria you must meet, and then we
111might ask you to join the list or you can ask to join it. It really is not a
112formal process. We basically only require that you have a long-term presence
113in the curl project and you have shown an understanding for the project and
114its way of working. You must have been around for a good while and you should
115have no plans of vanishing in the near future.
116
117We do not make the list of participants public mostly because it tends to vary
118somewhat over time and a list somewhere only risks getting outdated.
119
120## Publishing Security Advisories
121
1221. Write up the security advisory, using markdown syntax. Use the same
123   subtitles as last time to maintain consistency.
124
1252. Name the advisory file after the allocated CVE id.
126
1273. Add a line on the top of the array in `curl-www/docs/vuln.pm`.
128
1294. Put the new advisory markdown file in the `curl-www/docs/` directory. Add it
130   to the git repository.
131
1325. Run `make` in your local web checkout and verify that things look fine.
133
1346. On security advisory release day, push the changes on the curl-www
135   repository's remote master branch.
136
137## HackerOne
138
139Request the issue to be disclosed. If there are sensitive details present in
140the report and discussion, those should be redacted from the disclosure. The
141default policy is to disclose as much as possible as soon as the vulnerability
142has been published.
143
144## Bug Bounty
145
146See [BUG-BOUNTY](https://curl.se/docs/bugbounty.html) for details on the
147bug bounty program.
148
149# Severity levels
150
151The curl project's security team rates security problems using four severity
152levels depending how serious we consider the problem to be. We use **Low**,
153**Medium**, **High** and **Critical**. We refrain from using numerical scoring
154of vulnerabilities.
155
156We do not support CVSS as a method to grade security vulnerabilities, so we do
157not set them for CVE records published by the curl project. We believe CVSS is
158a broken system that often does not properly evaluate to suitable severity
159levels that reflect all dimensions and factors involved. Other organizations
160however set and provide CVSS scores for curl vulnerabilities. You need to
161decide for yourself if you believe they know enough about the subjects
162involved to make reasonable assessments. Deciding between four different
163severity levels is hard enough for us.
164
165When deciding severity level on a particular issue, we take all the factors
166into account: attack vector, attack complexity, required privileges, necessary
167build configuration, protocols involved, platform specifics and also what
168effects a possible exploit or trigger of the issue can lead do, including
169confidentiality, integrity or availability problems.
170
171## Low
172
173This is a security problem that is truly hard or unlikely to exploit or
174trigger. Due to timing, platform requirements or the fact that options or
175protocols involved are rare etc. [Past
176example](https://curl.se/docs/CVE-2022-43552.html)
177
178## Medium
179
180This is a security problem that is less hard than **Low** to exploit or
181trigger. Less strict timing, wider platforms availability or involving more
182widely used options or protocols. A problem that usually needs something else
183to also happen to become serious. [Past
184example](https://curl.se/docs/CVE-2022-32206.html)
185
186## High
187
188This issue in itself a serious problem with real world impact. Flaws that can
189easily compromise the confidentiality, integrity or availability of resources.
190Exploiting or triggering this problem is not hard. [Past
191example](https://curl.se/docs/CVE-2019-3822.html)
192
193## Critical
194
195Easily exploitable by a remote unauthenticated attacker and lead to system
196compromise (arbitrary code execution) without requiring user interaction, with
197a common configuration on a popular platform. This issue has few restrictions
198and requirements and can be exploited easily using most curl configurations.
199[Past example](https://curl.se/docs/CVE-2000-0973.html)
200
201# Not security issues
202
203This is an incomplete list of issues that are not considered vulnerabilities.
204
205## Small memory leaks
206
207We do not consider a small memory leak a security problem; even if the amount
208of allocated memory grows by a small amount every now and then. Long-living
209applications and services already need to have counter-measures and deal with
210growing memory usage, be it leaks or just increased use. A small memory or
211resource leak is then expected to *not* cause a security problem.
212
213Of course there can be a discussion if a leak is small or not. A large leak
214can be considered a security problem due to the DOS risk. If leaked memory
215contains sensitive data it might also qualify as a security problem.
216
217## Never-ending transfers
218
219We do not consider flaws that cause a transfer to never end to be a security
220problem. There are already several benign and likely reasons for transfers to
221stall and never end, so applications that cannot deal with never-ending
222transfers already need to have counter-measures established.
223
224If the problem avoids the regular counter-measures when it causes a never-
225ending transfer, it might be a security problem.
226
227## Not practically possible
228
229If the flaw or vulnerability cannot practically get executed on existing
230hardware it is not a security problem.
231
232## API misuse
233
234If a reported issue only triggers by an application using the API in a way
235that is not documented to work or even documented to not work, it is probably
236not going to be considered a security problem. We only guarantee secure and
237proper functionality when the APIs are used as expected and documented.
238
239There can be a discussion about what the documentation actually means and how
240to interpret the text, which might end up with us still agreeing that it is a
241security problem.
242
243## Local attackers already present
244
245When an issue can only be attacked or misused by an attacker present on the
246local system or network, the bar is raised. If a local user wrongfully has
247elevated rights on your system enough to attack curl, they can probably
248already do much worse harm and the problem is not really in curl.
249
250## Experiments
251
252Vulnerabilities in features which are off by default (in the build) and
253documented as experimental, are not eligible for a reward and we do not
254consider them security problems.
255
256## URL inconsistencies
257
258URL parser inconsistencies between browsers and curl are expected and are not
259considered security vulnerabilities. The WHATWG URL Specification and RFC
2603986+ (the plus meaning that it is an extended version) [are not completely
261interoperable](https://github.com/bagder/docs/blob/master/URL-interop.md).
262
263Obvious parser bugs can still be vulnerabilities of course.
264
265## Visible command line arguments
266
267The curl command blanks the contents of a number of command line arguments to
268prevent them from appearing in process listings. It does not blank all
269arguments even if some of them that are not blanked might contain sensitive
270data. We consider this functionality a best-effort and omissions are not
271security vulnerabilities.
272
273 - not all systems allow the arguments to be blanked in the first place
274 - since curl blanks the argument itself they are readable for a short moment
275   no matter what
276 - virtually every argument can contain sensitive data, depending on use
277 - blanking all arguments would make it impractical for users to differentiate
278   curl command lines in process listings
279
280## Busy-loops
281
282Busy-loops that consume 100% CPU time but eventually end (perhaps due to a set
283timeout value or otherwise) are not considered security problems. Applications
284are supposed to already handle situations when the transfer loop legitimately
285consumes 100% CPU time, so while a prolonged such busy-loop is a nasty bug, we
286do not consider it a security problem.
287
288## Saving files
289
290curl cannot protect against attacks where an attacker has write access to the
291same directory where curl is directed to save files.
292
293## Tricking a user to run a command line
294
295A creative, misleading or funny looking command line is not a security
296problem. The curl command line tool takes options and URLs on the command line
297and if an attacker can trick the user to run a specifically crafted curl
298command line, all bets are off. Such an attacker can just as well have the
299user run a much worse command that can do something fatal (like
300`sudo rm -rf /`).
301
302## Terminal output and escape sequences
303
304Content that is transferred from a server and gets displayed in a terminal by
305curl may contain escape sequences or use other tricks to fool the user. This
306is curl working as designed and is not a curl security problem. Escape
307sequences, moving cursor, changing color etc, is also frequently used for
308good. To reduce the risk of getting fooled, save files and browse them after
309download using a display method that minimizes risks.
310
311## NULL dereferences and crashes
312
313If a malicious server can trigger a NULL dereference in curl or otherwise
314cause curl to crash (and nothing worse), chances are big that we do not
315consider that a security problem.
316
317Malicious servers can already cause considerable harm and denial of service
318like scenarios without having to trigger such code paths. For example by
319stalling, being terribly slow or by delivering enormous amounts of data.
320Additionally, applications are expected to handle "normal" crashes without
321that being the end of the world.
322
323There need to be more and special circumstances to treat such problems as
324security issues.
325