CVE-2017-13089
GNU Wget: stack overflow in HTTP protocol handling
HIGH 8.8
At a glance
- Source
- NVD
- EPSS
- EPSS 79.86 % · percentile 100 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- certcc
- NVD status
- Modified
Description
The http.c:skip_short_body() function is called in some circumstances, such as when processing redirects. When the response is sent chunked in wget before 1.19.2, the chunk parser uses strtol() to read each chunk's length, but doesn't check that the chunk length is a non-negative number. The code then tries to skip the chunk in pieces of 512 bytes by using the MIN() macro, but ends up passing the negative chunk length to connect.c:fd_read(). As fd_read() takes an int argument, the high 32 bits of the chunk length are discarded, leaving fd_read() with a completely attacker controlled length argument.
Weaknesses (CWE)
- CWE-121 — Stack-based Buffer Overflow
- CWE-119 — Improper Restriction of Operations within the Bounds of a Memory Buffer
References
- https://www.viestintavirasto.fi/en/cybersecurity/vulnerabilities/2017/haavoittuvuus-2017-037.html
- https://security.gentoo.org/glsa/201711-06
- http://www.debian.org/security/2017/dsa-4008
- https://www.synology.com/support/security/Synology_SA_17_62_Wget
- http://git.savannah.gnu.org/cgit/wget.git/commit/?id=d892291fb8ace4c3b734ea5125770989c215df3f
- http://www.securityfocus.com/bid/101592
- https://github.com/r1b/CVE-2017-13089
- http://www.securitytracker.com/id/1039661
- https://access.redhat.com/errata/RHSA-2017:3075
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | certcc |
| CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | NVD · cret@cert.org (Secondary) |
| CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
| CVSS 2.0 | HIGH 9.3 | AV:N/AC:M/Au:N/C:C/I:C/A:C | NVD · nvd@nist.gov (Primary) |
European references
- ENISA EUVD · EUVD-2017-4607
- GCVE · GCVE-0-2017-13089
CERT-FR advisories
- CERTFR-2022-AVI-267 — Multiples vulnérabilités dans Juniper Networks Junos Space · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:gnu:wget:*:*:*:*:*:*:*:*≤ 1.19.1cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
Affected products
| Product | Versions |
|---|---|
| GNU Project · Wget | affected prior to 1.19.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |