{"schemaVersion":3,"id":"CVE-2019-12521","aliases":["ALPINE-CVE-2019-12521","UBUNTU-CVE-2019-12521","DEBIAN-CVE-2019-12521"],"status":"published","duplicateOf":null,"title":null,"description":"An issue was discovered in Squid through 4.7. When Squid is parsing ESI, it keeps the ESI elements in ESIContext. ESIContext contains a buffer for holding a stack of ESIElements. When a new ESIElement is parsed, it is added via addStackElement. addStackElement has a check for the number of elements in this buffer, but it's off by 1, leading to a Heap Overflow of 1 element. The overflow is within the same structure so it can't affect adjacent memory blocks, and thus just leads to a crash while processing.","dates":{"published":"2020-04-15T18:47:43.000Z","modified":"2024-08-04T23:24:38.850Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.9,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4.3,"severity":"medium","vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":5.6,"impact":6,"computed":true}]},"epss":{"probability":0.05909,"percentile":0.93166,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.05909},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.05909,"percentile":0.93166}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.05909,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.05909,"percentile":0.93166}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-193","name":"Off-by-one Error","description":"A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/193.html"},{"id":"CWE-787","name":"Out-of-bounds Write","description":"The product writes data past the end, or before the beginning, of the intended buffer.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/787.html"}],"affected":[{"vendor":"alpine","product":"squid","name":"squid","label":"squid","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/squid","purlType":"apk","versions":[{"text":"≥ 3.0, < 4.11-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 3.0, < 4.11-r0","eol":null,"hubHref":null},{"vendor":"canonical","product":"ubuntu_linux","name":"ubuntu linux","label":"ubuntu_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"16.04","noFixRecorded":false,"fixedIn":null},{"text":"18.04","noFixRecorded":false,"fixedIn":null},{"text":"19.10","noFixRecorded":false,"fixedIn":null},{"text":"20.04","noFixRecorded":false,"fixedIn":null}],"versionsText":"16.04 | 18.04 | 19.10 | 20.04","eol":{"isEol":true,"eolDate":"2021-04-02T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"16.04","label":"16.04 'Xenial Xerus' (LTS)","eolFrom":"2021-04-02T00:00:00.000Z","isLts":true,"isMaintained":false,"latestVersion":"16.04.7"},"product":{"name":"ubuntu","label":"Ubuntu","category":"os"}},"hubHref":"/vendor/canonical/ubuntu_linux"},{"vendor":"debian","product":"squid","name":"squid","label":"squid","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/squid","purlType":"deb","versions":[{"text":"< 4.11-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.11-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"squid","name":"squid","label":"squid","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/squid","purlType":"deb","versions":[{"text":"< 4.10-1ubuntu1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.10-1ubuntu1.1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"squid3","name":"squid3","label":"squid3","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/squid3","purlType":"deb","versions":[{"text":"< 3.5.12-1ubuntu7.11","noFixRecorded":false,"fixedIn":null},{"text":"< 3.5.27-1ubuntu1.6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.5.12-1ubuntu7.11 | < 3.5.27-1ubuntu1.6","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"9.0","noFixRecorded":false,"fixedIn":null},{"text":"10.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"9.0 | 10.0","eol":{"isEol":true,"eolDate":"2022-07-01T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"9","label":"9 (Stretch)","eolFrom":"2022-07-01T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"9.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"opensuse","product":"leap","name":"leap","label":"leap","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"15.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"15.1","eol":{"isEol":true,"eolDate":"2021-02-02T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"15.1","label":"Leap 15.1","eolFrom":"2021-02-02T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"opensuse","label":"openSUSE","category":"os"}},"hubHref":"/vendor/opensuse/leap"},{"vendor":"squid-cache","product":"squid","name":"squid","label":"squid","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 3.0, ≤ 3.5.28","noFixRecorded":false,"fixedIn":null},{"text":"≥ 4.0, ≤ 4.7","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0, ≤ 5.0.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 3.0, ≤ 3.5.28 | ≥ 4.0, ≤ 4.7 | ≥ 5.0, ≤ 5.0.1","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"squid","label":"Squid","category":"server-app"}},"hubHref":"/vendor/squid-cache/squid"}],"affectedCount":8,"eol":{"hasEol":true,"count":3},"references":[{"url":"https://gitlab.com/jeriko.one/security/-/blob/master/squid/CVEs/CVE-2019-12521.txt","label":"gitlab.com/jeriko.one/security/-/blob/master/squid/CVEs/CVE-2019-12521.txt","hostname":"gitlab.com","tags":["X Refsource MISC","Third Party Advisory","REPORT"]},{"url":"http://www.openwall.com/lists/oss-security/2020/04/23/1","label":"www.openwall.com/lists/oss-security/2020/04/23/1","hostname":"www.openwall.com","tags":["Mailing List","X Refsource MLIST","Patch","Third Party Advisory"]},{"url":"https://www.debian.org/security/2020/dsa-4682","label":"www.debian.org/security/2020/dsa-4682","hostname":"www.debian.org","tags":["Vendor Advisory","X Refsource DEBIAN","Third Party Advisory"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00018.html","label":"lists.opensuse.org/opensuse-security-announce/2020-05/msg00018.html","hostname":"lists.opensuse.org","tags":["Vendor Advisory","X Refsource SUSE","Mailing List","Third Party Advisory"]},{"url":"https://security.gentoo.org/glsa/202005-05","label":"security.gentoo.org/glsa/202005-05","hostname":"security.gentoo.org","tags":["Vendor Advisory","X Refsource GENTOO","Third Party Advisory"]},{"url":"https://usn.ubuntu.com/4356-1/","label":"usn.ubuntu.com/4356-1/","hostname":"usn.ubuntu.com","tags":["Vendor Advisory","X Refsource UBUNTU","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/07/msg00009.html","label":"lists.debian.org/debian-lts-announce/2020/07/msg00009.html","hostname":"lists.debian.org","tags":["Mailing List","X Refsource MLIST","Third Party Advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20210205-0006/","label":"security.netapp.com/advisory/ntap-20210205-0006/","hostname":"security.netapp.com","tags":["X Refsource CONFIRM","Third Party Advisory"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2019-12521","label":"security.alpinelinux.org/vuln/CVE-2019-12521","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2019-12521","label":"ubuntu.com/security/CVE-2019-12521","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"http://www.squid-cache.org/Advisories/SQUID-2019_12.txt","label":"www.squid-cache.org/Advisories/SQUID-2019_12.txt","hostname":"www.squid-cache.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-4356-1","label":"ubuntu.com/security/notices/USN-4356-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2019-12521","label":"www.cve.org/CVERecord?id=CVE-2019-12521","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2019-12521","label":"security-tracker.debian.org/tracker/CVE-2019-12521","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["DLA-2278-1","DSA-4682-1","OPENSUSE-SU-2020:0623-1","RHSA-2020:4743","SUSE-SU-2020:1134-1","SUSE-SU-2020:1156-1","SUSE-SU-2020:1227-1","SUSE-SU-2020:14460-1","USN-4356-1"],"duplicates":[],"related":["OPENSUSE-SU-2020:0623-1","SUSE-SU-2020:1134-1","SUSE-SU-2020:1156-1","SUSE-SU-2020:1227-1","SUSE-SU-2020:14460-1","USN-4356-1"]},"timeline":[{"kind":"published","date":"2020-04-15T18:47:43.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-04T23:24:38.850Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":25,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T15:47:22.213Z","stale":false,"partial":false}}