Artifactspublic-v0

curl

master
ply4 git calls26 ms290 KiB3 cachedprotocol v2
149 lines5.6 KiBRaw

Known Risks

This is an incomplete list of known risks when running and using curl and libcurl.

Risks

Insecure transfers

When using curl to perform transfers with protocols that are insecure or the server identity is unverified, everything that is sent and received can be intercepted by eavesdroppers and the servers can easily be spoofed by impostors.

Untrusted input

You should never run curl command lines or use curl config files provided to you from untrusted sources.

curl can do a lot of things, and you should only ask it do things you want and deem correct.

Even accepting only the URL part without careful vetting might make curl do things you do not like. Like accessing internal hosts, like connecting to rogue servers that redirect to even weirder places, like using ports or protocols that play tricks on you.

Command line misuse

The command line tool and its options should be used and be expected to work as documented. Relying on undocumented functions or side-effects is unreliable as they may cause problems or get changed behavior between releases.

For several command line options, you can confuse either curl or the involved server endpoint by using characters or byte sequences for the option that are not expected. For example, adding line feeds and/or carriage returns to inputs can produce unexpected, invalid, or insecure results.

API misuse

Applications using the libcurl API in a way that is not documented to work or even documented to not work, is unsafe and might cause security problems. We only guarantee secure and proper functionality when the APIs are used as documented.

Local attackers already present

When there is a local attacker present locally, curl cannot prevent such an adversary to use curl's full potential. Possibly in malicious ways.

Remote attackers already present

When there is a remote attacker already present in the server, curl cannot protect its operations against mischief. For example, if an attacker manages to insert a symlink in your remote upload directory the upload may cause havoc. Maybe the attacker makes certain responses come back with unexpected content.

Debug & Experiments

We encourage users to test curl experiments and use debug code, but only in controlled environments and setups - never in production.

Using debug builds and experimental curl features in production is a security risk. Do not do that.

The same applies to scripts and software which are not installed by default through the make install rule: they are not intended or made for production use.

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.

You must never expect two independent URL parsers to treat every URL identically.

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 though some that are not blanked might contain sensitive data.

  • not all systems allow the arguments to be blanked in the first place
  • since curl blanks the argument itself they are readable for a short moment no matter what
  • 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

HTTP headers in redirects

It is powerful to provide a set of custom headers to curl. Beware that when asking curl to follow HTTP redirects, it also sends those headers to the new URL which might be a different server. That might do another redirect etc.

curl makes some limited attempts to not leak credentials this way when set using the standard curl options, but when you pass on custom headers curl cannot know what headers or details in those headers are sensitive.

Verbose logs

When asked to provide verbose output and trace logging, curl may output and show details that are private and sensitive. Like for example raw credentials or the password weakly disguised using base64 encoding.

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

Legacy dependencies

Every curl build is made to use a range of third party libraries. Each third party library also needs to be safe and secure for the entire operation to be risk-free.

Relying on legacy dependencies is a risk.

Weak algorithms

curl supports several cryptographic algorithms that are considered weak, like DES and MD5. These algorithms are still in use because some protocols and transfer options require use of them. For example legacy HTTP Digest authentication.

curl users should consider switching to servers and options that use modern and secure algorithms.

Compression bombs

When asking curl or libcurl to automatically decompress data on arrival, there is a risk that the size of the output from the decompression process ends up many times larger than the input data size.

Since curl 8.20.0, users can mitigate this risk by setting the max filesize option that also covers the decompressed size.

1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
4SPDX-License-Identifier: curl
5-->
7# Known Risks
9This is an incomplete list of known risks when running and using curl and
10libcurl.
12# Risks
14## Insecure transfers
16When using curl to perform transfers with protocols that are insecure or the
17server identity is unverified, everything that is sent and received can be
18intercepted by eavesdroppers and the servers can easily be spoofed by
19impostors.
21## Untrusted input
23You should **never** run curl command lines or use curl config files provided
24to you from untrusted sources.
26curl can do a lot of things, and you should only ask it do things you want and
27deem correct.
29Even accepting only the URL part without careful vetting might make curl do
30things you do not like. Like accessing internal hosts, like connecting to
31rogue servers that redirect to even weirder places, like using ports or
32protocols that play tricks on you.
34## Command line misuse
36The command line tool and its options should be used and be expected to work
37as documented. Relying on undocumented functions or side-effects is unreliable
38as they may cause problems or get changed behavior between releases.
40For several command line options, you can confuse either curl or the involved
41server endpoint by using characters or byte sequences for the option that are
42not expected. For example, adding line feeds and/or carriage returns to inputs
43can produce unexpected, invalid, or insecure results.
45## API misuse
47Applications using the libcurl API in a way that is not documented to work or
48even documented to not work, is unsafe and might cause security problems. We
49only guarantee secure and proper functionality when the APIs are used as
50documented.
52## Local attackers already present
54When there is a local attacker present locally, curl cannot prevent such an
55adversary to use curl's full potential. Possibly in malicious ways.
57## Remote attackers already present
59When there is a remote attacker already present in the server, curl cannot
60protect its operations against mischief. For example, if an attacker manages
61to insert a symlink in your remote upload directory the upload may cause
62havoc. Maybe the attacker makes certain responses come back with unexpected
63content.
65## Debug & Experiments
67We encourage users to test curl experiments and use debug code, but only in
68controlled environments and setups - never in production.
70Using debug builds and experimental curl features in production is a security
71risk. Do not do that.
73The same applies to scripts and software which are not installed by default
74through the make install rule: they are not intended or made for production
75use.
77## URL inconsistencies
79URL parser inconsistencies between browsers and curl are expected and are not
80considered security vulnerabilities. The WHATWG URL Specification and RFC
813986+ (the plus meaning that it is an extended version) [are not completely
82interoperable](https://github.com/bagder/docs/blob/master/URL-interop.md).
84You must never expect two independent URL parsers to treat every URL
85identically.
87## Visible command line arguments
89The curl command blanks the contents of a number of command line arguments to
90prevent them from appearing in process listings. It does not blank all
91arguments, even though some that are not blanked might contain sensitive data.
93- not all systems allow the arguments to be blanked in the first place
94- since curl blanks the argument itself they are readable for a short moment
95 no matter what
96- virtually every argument can contain sensitive data, depending on use
97- blanking all arguments would make it impractical for users to differentiate
98 curl command lines in process listings
100## HTTP headers in redirects
102It is powerful to provide a set of custom headers to curl. Beware that when
103asking curl to follow HTTP redirects, it also sends those headers to the new
104URL which might be a different server. That might do another redirect etc.
106curl makes some limited attempts to not leak credentials this way when set
107using the standard curl options, but when you pass on custom headers curl
108cannot know what headers or details in those headers are sensitive.
110## Verbose logs
112When asked to provide verbose output and trace logging, curl may output and
113show details that are private and sensitive. Like for example raw credentials
114or the password weakly disguised using base64 encoding.
116## Terminal output and escape sequences
118Content that is transferred from a server and gets displayed in a terminal by
119curl may contain escape sequences or use other tricks to fool the user. Escape
120sequences, moving cursor, changing color etc, is also frequently used for
121good. To reduce the risk of getting fooled, save files and browse them after
122download using a display method that minimizes risks.
124## Legacy dependencies
126Every curl build is made to use a range of third party libraries. Each third
127party library also needs to be safe and secure for the entire operation to be
128risk-free.
130Relying on legacy dependencies is a risk.
132## Weak algorithms
134curl supports several cryptographic algorithms that are considered weak, like
135DES and MD5. These algorithms are still in use because some protocols and
136transfer options require use of them. For example legacy HTTP Digest
137authentication.
139curl users should consider switching to servers and options that use modern
140and secure algorithms.
142## Compression bombs
144When asking curl or libcurl to automatically decompress data on arrival, there
145is a risk that the size of the output from the decompression process ends up
146many times larger than the input data size.
148Since curl 8.20.0, users can mitigate this risk by setting the max filesize
149option that also covers the decompressed size.
Diagnostics4 git calls · 26 ms
CallStatusSizeTime026 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=21
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2002.7 KiB · hit21 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=2726
git.response.cache=HIT
git.response.duration_ms=21
git.fetch.wants=15f6c334ec4a9515a893bdf487ad219d9f915101
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2726
git.pkt.payload.max=2705
git.sideband.band1.bytes=2704
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e32dddeabb8821
Request
7f1f1118…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format