Skip to main content

Improper Restriction of Operations within the Bounds of a Memory Buffer

CVE-2017-9502

Severity Medium
Score 5.3/10

Summary

In curl 7.53.0 through 7.54.0 on Windows and DOS, libcurl's default protocol function, which is the logic that allows an application to set which protocol libcurl should attempt to use when given a URL without a scheme part, had a flaw that could lead to it overwriting a heap based memory buffer with seven bytes. If the default protocol is specified to be FILE or a file: URL lacks two slashes, the given "URL" starts with a drive letter, and libcurl is built for Windows or DOS, then libcurl would copy the path 7 bytes off, so that the end of the given path would write beyond the malloc buffer (7 bytes being the length in bytes of the ascii string "file://").

  • LOW
  • NETWORK
  • NONE
  • UNCHANGED
  • NONE
  • NONE
  • NONE
  • LOW

CWE-119 - Buffer Overflow

Buffer overflow attacks involve data transit and operations exceeding the restricted memory buffer, thereby corrupting or overwriting data in adjacent memory locations. Such overflow allows the attacker to run arbitrary code or manipulate the existing code to cause privilege escalation, data breach, denial of service, system crash and even complete system compromise. Given that languages such as C and C++ lack default safeguards against overwriting or accessing data in their memory, applications utilizing these languages are most susceptible to buffer overflows attacks.

References

Advisory Timeline

  • Published