Free of Memory not on the Heap Affecting curl package, versions [8.6.0,8.9.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.07% (31st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-CURL-7554684
  • published 24 Jul 2024
  • disclosed 24 Jul 2024
  • credit z2_

How to fix?

Upgrade curl to version 8.9.0 or higher.

Overview

curl is a command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP. libcurl offers a myriad of powerful features.

Affected versions of this package are vulnerable to Free of Memory not on the Heap in the ASN1 parser, through the utf8asn1str function, upon detecting an invalid ASN.1 UTF-8 string, erroneously invokes free() on a 4-byte local stack buffer. This can lead to the overwriting of nearby stack memory, potentially causing a crash or, in special circumstances, more severe outcomes.

Exploiting this vulnerability is possible on a system that uses a malloc implementation that does not immediately abort upon error.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
5.9 medium
  • Attack Vector (AV)
    Local
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    None
  • Integrity (VI)
    High
  • Availability (VA)
    High
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None