3.1low
TELNET stack contents disclosure
- Severity
- 3.1low CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 4.51% (higher than 91% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- hackerone
- Also known as
- CURL-CVE-2021-22898
Description
curl 7.7 through 7.76.1 suffers from an information disclosure when the `-t` command line option, known as `CURLOPT_TELNETOPTIONS` in libcurl, is used to send variable=content pairs to TELNET servers. Due to a flaw in the option parser for sending NEW_ENV variables, libcurl could be made to pass on uninitialized data from a stack based buffer to the server, resulting in potentially revealing sensitive internal information to the server using a clear-text network protocol.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| https://github.com/curl/curl | 7.7 through 7.76.1 | CVE List |
| https://github.com/curl/curl.git | from 7.7 before 7.77.0, from a1d6ad26100bc493c7b04f1301b1634b7f5aa8b4 before 39ce47f219b09c380b81f89fe54ac586c8db6bde | curl |
| haxx curl | from 7.7 up to 7.76.1 | NVD |
| debian debian_linux | 9.0 | NVD |
| fedoraproject fedora | 33, 34 | NVD |
| oracle communications_cloud_native_core_binding_support_function | 1.11.0 | NVD |
| oracle communications_cloud_native_core_network_function_cloud_native_environment | 1.10.0 | NVD |
| oracle communications_cloud_native_core_network_repository_function | 1.15.0, 1.15.1 | NVD |
| oracle communications_cloud_native_core_network_slice_selection_function | 1.8.0 | NVD |
| oracle communications_cloud_native_core_service_communication_proxy | 1.15.0 | NVD |
| oracle essbase | before 11.1.2.4.047, from 21.0 before 21.3 | NVD |
| oracle mysql_server | before 5.7.34, from 8.0.15 before 8.0.25 | NVD |
| siemens sinec_infrastructure_network_services | before 1.0.1.1 | NVD |
| splunk universal_forwarder | from 8.2.0 before 8.2.12, from 9.0.0 before 9.0.6, 9.1.0 | NVD |
All scores
| CISA-ADP | 3.1low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| curl | medium rating | |
| NVD | 3.1low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N |
| NVD | 2.6low CVSS:2.0 | AV:N/AC:H/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
curl 7.7 through 7.76.1 suffers from an information disclosure when the `-t` command line option, known as `CURLOPT_TELNETOPTIONS` in libcurl, is used to send variable=content pairs to TELNET servers. Due to a flaw in the option parser for sending NEW_ENV variables, libcurl could be made to pass on uninitialized data from a stack based buffer to the server, resulting in potentially revealing sensitive internal information to the server using a clear-text network protocol.
curl
curl supports the -t command line option, known as CURLOPT_TELNETOPTIONS
in libcurl. This rarely used option is used to send variable=content pairs to
TELNET servers.
Due to flaw in the option parser for sending NEW_ENV variables, libcurl
could be made to pass on uninitialized data from a stack based buffer to the
server. Therefore potentially revealing sensitive internal information to the
server using a clear-text network protocol.
This could happen because curl did not check the return code from a
sscanf(command, "%127[^,],%127s") function invoke correctly, and would leave
the piece of the send buffer uninitialized for the value part if it was
provided longer than 127 bytes. The buffer used for this is 2048 bytes big and
the variable part of the variable=content pairs would be stored correctly
in the send buffer, making curl sending "interleaved" bytes sequences of stack
contents. A single curl TELNET handshake could then be made to send off a
total of around 1800 bytes of (non-contiguous) stack contents in this style:
[control byte]name[control byte]
stack contents
[control byte]name[control byte]
stack contents
...
An easy proof of concept command line looks like this:
curl telnet://example.com -tNEW_ENV=a,bbbbbb (256 'b's)
NVD (es)
curl versiones 7.7 hasta 7.76.1 sufre de una divulgacion de información cuando la opción de línea de comandos "-t", conocida como "CURLOPT_TELNETOPTIONS" en libcurl, se usa para enviar pares de variables=contenido a servidores TELNET. Debido a un fallo en el analizador de opciones para el envío de variables NEW_ENV, podría hacer que libcurl pasara datos no inicializados de un búfer basado en la pila al servidor, resultando en una potencial divulgación de información interna confidencial al servidor que usaba un protocolo de red de texto sin cifrar
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-22898 changed 2026-10-14 | CVE Terms of Use |
| curl | CURL-CVE-2021-22898 changed 2026-10-25 | MIT |
| NVD | CVE-2021-22898 changed 2026-10-14 | Public domain |