Skip to content
Heist/ feed
Back to feed
Medium

cookie parser out of boundary memory access

Type: advisorySources: OSV

libcurl supports HTTP "cookies" as documented in RFC 6265. Together with each individual cookie there are several different properties, but for this vulnerability we focus on the associated "path" element. It tells information about for which path on a given host the cookie is valid. The internal libcurl function called `sanitize_cookie_path()` that cleans up the path element as given to it from a remote site or when read from a file, did not properly validate the input. If given a path that consisted of a single double-quote, libcurl would index a newly allocated memory area with index -1 and assign a zero to it, thus destroying heap memory it was not supposed to. At best, this gets unnoticed but can also lead to a crash or worse. We have not researched further what kind of malicious actions that potentially this could be used for. Applications have to explicitly enable cookie parsing in libcurl for this problem to trigger, and if not enabled libcurl does not hit this problem.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2015-3145
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 09:39 UTC · Revision 1

Source evidence

cookie parser out of boundary memory access

core-osv · Original source

Published 22 Apr 2015, 08:00 UTC

libcurl supports HTTP "cookies" as documented in RFC 6265. Together with each individual cookie there are several different properties, but for this vulnerability we focus on the associated "path" element. It tells information about for which path on a given host the cookie is valid. The internal libcurl function called `sanitize_cookie_path()` that cleans up the path element as given to it from a remote site or when read from a file, did not properly validate the input. If given a path that consisted of a single double-quote, libcurl would index a newly allocated memory area with index -1 and assign a zero to it, thus destroying heap memory it was not supposed to. At best, this gets unnoticed but can also lead to a crash or worse. We have not researched further what kind of malicious actions that potentially this could be used for. Applications have to explicitly enable cookie parsing in libcurl for this problem to trigger, and if not enabled libcurl does not hit this problem.

osv:CURL-CVE-2015-3145
Complete source record
{
  "id": "9d13cb141b3aa7497a29c316c078da00100f973ee4ec2afb035d7bf185b12260",
  "url": "https://osv.dev/vulnerability/CURL-CVE-2015-3145",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "cookie parser out of boundary memory access",
    "summary": "libcurl supports HTTP \"cookies\" as documented in RFC 6265. Together with each individual cookie there are several different properties, but for this vulnerability we focus on the associated \"path\" element. It tells information about for which path on a given host the cookie is valid. The internal libcurl function called `sanitize_cookie_path()` that cleans up the path element as given to it from a remote site or when read from a file, did not properly validate the input. If given a path that consisted of a single double-quote, libcurl would index a newly allocated memory area with index -1 and assign a zero to it, thus destroying heap memory it was not supposed to. At best, this gets unnoticed but can also lead to a crash or worse. We have not researched further what kind of malicious actions that potentially this could be used for. Applications have to explicitly enable cookie parsing in libcurl for this problem to trigger, and if not enabled libcurl does not hit this problem.",
    "evidence": "osv:CURL-CVE-2015-3145",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CURL-CVE-2015-3145",
      "aliases": [
        "CURL-CVE-2015-3145",
        "CVE-2015-3145"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "7.31.0"
                },
                {
                  "fixed": "7.42.0"
                }
              ]
            },
            {
              "repo": "https://github.com/curl/curl.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f24dc09d209a2f91ca38d854f0c15ad93f3d7e2d"
                },
                {
                  "fixed": "b5f947b8ac0e282c61c75b69cd5b9d37dafc6959"
                }
              ]
            }
          ],
          "versions": [
            "7.41.0",
            "7.40.0",
            "7.39.0",
            "7.38.0",
            "7.37.1",
            "7.37.0",
            "7.36.0",
            "7.35.0",
            "7.34.0",
            "7.33.0",
            "7.32.0",
            "7.31.0",
            "curl-7_41_0",
            "curl-7_40_0",
            "curl-7_39_0",
            "curl-7_38_0",
            "curl-7_37_1",
            "curl-7_37_0",
            "curl-7_36_0",
            "curl-7_35_0",
            "curl-7_34_0",
            "curl-7_33_0",
            "curl-7_32_0",
            "curl-7_31_0"
          ],
          "database_specific": {
            "source": "https://curl.se/docs/CURL-CVE-2015-3145.json",
            "vanir_signatures": [
              {
                "id": "CURL-CVE-2015-3145-45401199",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "293563771843034153120071997404243464066",
                    "289614564877088622217344177799380382972",
                    "50498536746157685716813616910491095043",
                    "295537095925371282186368242809537621657",
                    "62264493403146632954184705088746894114",
                    "178344282507991223133292553271951997017",
                    "94800141695634214740011328778152424046",
                    "36548534372095779693887026828094614755",
                    "234723359792059470851083126105044695245",
                    "184815900173780659492738533370050725819",
                    "123804182142046795488228724850281630496",
                    "49896981419524448296182980446720025504",
                    "304286752593192325307573153722813475165"
                  ]
                },
                "source": "https://github.com/curl/curl.git/commit/b5f947b8ac0e282c61c75b69cd5b9d37dafc6959",
                "target": {
                  "file": "lib/cookie.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CURL-CVE-2015-3145-52bd4870",
                "digest": {
                  "length": 513,
                  "function_hash": "115503220579082677945659424175936200582"
                },
                "source": "https://github.com/curl/curl.git/commit/b5f947b8ac0e282c61c75b69cd5b9d37dafc6959",
                "target": {
                  "file": "lib/cookie.c",
                  "function": "sanitize_cookie_path"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-25T01:05:30Z"
          }
        }
      ],
      "modified": "2026-10-25T01:05:30.172506486Z",
      "provider": "osv",
      "references": [],
      "provider_metadata": {
        "CWE": {
          "id": "CWE-124",
          "desc": "Buffer Underwrite ('Buffer Underflow')"
        },
        "URL": "https://curl.se/docs/CVE-2015-3145.json",
        "www": "https://curl.se/docs/CVE-2015-3145.html",
        "affects": "both",
        "package": "curl",
        "severity": "Medium",
        "last_affected": "7.41.0"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2015-3145",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 444394,
  "published_at": "2015-04-22T08:00:00+00:00"
}