FlawAtlas
Search the atlas
CVE-2018-16842 Low

warning message out-of-buffer read

curl contains a heap out of buffer read vulnerability. The command line tool has a generic function for displaying warning and informational messages to stderr for various situations. For example if an unknown command line argument is used, or passed to it in a "config" file. This display function formats the output to wrap at 80 columns. The wrap logic is however flawed, so if a single word in the message is itself longer than 80 bytes the buffer arithmetic calculates the remainder wrong and ends up reading behind the end of the buffer. This could lead to information disclosure or crash. This vulnerability could lead to a security issue if used in this or similar situations: 1. a server somewhere uses the curl command line to run something 2. if it fails, it shows stderr to the user 3. the server takes user input for parts of its command line input 4. user provides something overly long that triggers this crash 5. the stderr output may now contain user memory contents that was not meant to be available

Exploit probability 2.1%
Published October 31, 2018
Required by Not available
Last source change May 27, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

90 explicit affected versions

Unknown Unknown

182 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2018-16842

Curl versions 7.14.1 through 7.61.1 are vulnerable to a heap-based buffer over-read in the tool_msgs.c:voutf() function that may result in information exposure and denial of service.

View original source
Open Source Vulnerabilities CURL-CVE-2018-16842

curl contains a heap out of buffer read vulnerability. The command line tool has a generic function for displaying warning and informational messages to stderr for various situations. For example if an unknown command line argument is used, or passed to it in a "config" file. This display function formats the output to wrap at 80 columns. The wrap logic is however flawed, so if a single word in the message is itself longer than 80 bytes the buffer arithmetic calculates the remainder wrong and ends up reading behind the end of the buffer. This could lead to information disclosure or crash. This vulnerability could lead to a security issue if used in this or similar situations: 1. a server somewhere uses the curl command line to run something 2. if it fails, it shows stderr to the user 3. the server takes user input for parts of its command line input 4. user provides something overly long that triggers this crash 5. the stderr output may now contain user memory contents that was not meant to be available

View original source

05 / REFERENCES

Further evidence