CVE-2017-13089
GNU Wget: stack overflow in HTTP protocol handling
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
2Exploited in Wild
-Decision
Descriptions
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.
Se llama a la función http.c:skip_short_body() en ciertas circunstancias, como cuando se procesan redirecciones. Cuando la respuesta se envía fragmentada en wget en versiones anteriores a la 1.19.2, el analizador de fragmentos utiliza srtol() para leer la longitud de cada fragmento, pero no comprueba si esta longitud es un número no negativo. El código entonces intenta saltarse el fragmento en partes de 512 bytes utilizando la macro MIN(), pero acaba pasando la longitud negativa del fragmento a connect.c:fd_read(). Ya que fd_read() toma un argumento int, los 32 bits de la longitud del fragmento se descartan, dejando fd_read() con un argumento de longitud controlado por completo por el atacante.
A stack-based buffer overflow when processing chunked, encoded HTTP responses was found in wget. By tricking an unsuspecting user into connecting to a malicious HTTP server, an attacker could exploit this flaw to potentially execute arbitrary code.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2017-08-22 CVE Reserved
- 2017-10-26 CVE Published
- 2017-11-15 First Exploit
- 2024-08-13 EPSS Updated
- 2024-09-17 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
- CWE-121: Stack-based Buffer Overflow
CAPEC
References (12)
URL | Tag | Source |
---|---|---|
http://www.securityfocus.com/bid/101592 | Issue Tracking | |
http://www.securitytracker.com/id/1039661 | Issue Tracking | |
https://www.synology.com/support/security/Synology_SA_17_62_Wget | X_refsource_confirm |
URL | Date | SRC |
---|---|---|
https://github.com/mzeyong/CVE-2017-13089 | 2017-11-15 | |
https://github.com/r1b/CVE-2017-13089 | 2024-09-17 |
URL | Date | SRC |
---|---|---|
http://www.debian.org/security/2017/dsa-4008 | 2017-12-30 | |
https://access.redhat.com/errata/RHSA-2017:3075 | 2017-12-30 | |
https://security.gentoo.org/glsa/201711-06 | 2017-12-30 | |
https://access.redhat.com/security/cve/CVE-2017-13089 | 2017-10-26 | |
https://bugzilla.redhat.com/show_bug.cgi?id=1505444 | 2017-10-26 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Gnu Search vendor "Gnu" | Wget Search vendor "Gnu" for product "Wget" | <= 1.19.1 Search vendor "Gnu" for product "Wget" and version " <= 1.19.1" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 8.0 Search vendor "Debian" for product "Debian Linux" and version "8.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 9.0 Search vendor "Debian" for product "Debian Linux" and version "9.0" | - |
Affected
|