{"id":"CVE-2019-12521","details":"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.","modified":"2026-04-09T06:24:27.701796Z","published":"2020-04-15T19:15:12.393Z","related":["ALSA-2020:4743","SUSE-SU-2020:1134-1","SUSE-SU-2020:1156-1","SUSE-SU-2020:1227-1","SUSE-SU-2020:14460-1","openSUSE-SU-2020:0623-1"],"references":[{"type":"ADVISORY","url":"https://www.debian.org/security/2020/dsa-4682"},{"type":"ADVISORY","url":"http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00018.html"},{"type":"ADVISORY","url":"https://gitlab.com/jeriko.one/security/-/blob/master/squid/CVEs/CVE-2019-12521.txt"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2020/07/msg00009.html"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202005-05"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20210205-0006/"},{"type":"ADVISORY","url":"https://usn.ubuntu.com/4356-1/"},{"type":"FIX","url":"http://www.openwall.com/lists/oss-security/2020/04/23/1"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/squid-cache/squid","events":[{"introduced":"0"},{"last_affected":"6cfeb300caf423ff49a0511d8bd43a56f3418273"},{"introduced":"0"},{"last_affected":"2e17b02616d37206ba9cccc53c20667624fbef9f"},{"introduced":"0"},{"last_affected":"8a511d5e05aa17b47c7566839fd9c524512489d3"}],"database_specific":{"versions":[{"introduced":"3.0"},{"last_affected":"3.5.28"},{"introduced":"4.0"},{"last_affected":"4.7"},{"introduced":"5.0"},{"last_affected":"5.0.1"}]}}],"versions":["HISTORIC_RELEASES","M-staged-PR161","M-staged-PR164","M-staged-PR170","M-staged-PR176","M-staged-PR179","M-staged-PR181","M-staged-PR182","M-staged-PR186","M-staged-PR189","M-staged-PR193","M-staged-PR195","M-staged-PR196","M-staged-PR198","M-staged-PR199","M-staged-PR200","M-staged-PR202","M-staged-PR206","M-staged-PR208","M-staged-PR209","M-staged-PR210","M-staged-PR218","M-staged-PR220","M-staged-PR221","M-staged-PR225","M-staged-PR227","M-staged-PR229","M-staged-PR230","M-staged-PR235","M-staged-PR237","M-staged-PR238","M-staged-PR239","M-staged-PR241","M-staged-PR242","M-staged-PR252","M-staged-PR255","M-staged-PR258","M-staged-PR264","M-staged-PR266","M-staged-PR267","M-staged-PR268","M-staged-PR274","M-staged-PR276","M-staged-PR293","M-staged-PR294","M-staged-PR295","M-staged-PR299","M-staged-PR306","M-staged-PR314","M-staged-PR319","M-staged-PR342","M-staged-PR345","M-staged-PR348","M-staged-PR351","M-staged-PR359","M-staged-PR364","M-staged-PR365","M-staged-PR366","M-staged-PR370","M-staged-PR372","M-staged-PR373","M-staged-PR375","M-staged-PR376","SQUID_3_0_PRE1","SQUID_3_0_PRE2","SQUID_3_0_PRE3","SQUID_3_0_PRE4","SQUID_3_0_PRE5","SQUID_3_0_PRE6","SQUID_3_0_PRE7","SQUID_3_0_RC1","SQUID_3_5_0_1","SQUID_3_5_0_2","SQUID_3_5_0_3","SQUID_3_5_0_4","SQUID_3_5_1","SQUID_3_5_10","SQUID_3_5_11","SQUID_3_5_12","SQUID_3_5_13","SQUID_3_5_14","SQUID_3_5_15","SQUID_3_5_16","SQUID_3_5_17","SQUID_3_5_18","SQUID_3_5_19","SQUID_3_5_2","SQUID_3_5_20","SQUID_3_5_21","SQUID_3_5_22","SQUID_3_5_23","SQUID_3_5_24","SQUID_3_5_25","SQUID_3_5_26","SQUID_3_5_27","SQUID_3_5_28","SQUID_3_5_3","SQUID_3_5_4","SQUID_3_5_5","SQUID_3_5_6","SQUID_3_5_7","SQUID_3_5_8","SQUID_3_5_9","SQUID_4_0_1","SQUID_4_0_10","SQUID_4_0_11","SQUID_4_0_12","SQUID_4_0_13","SQUID_4_0_14","SQUID_4_0_15","SQUID_4_0_16","SQUID_4_0_17","SQUID_4_0_18","SQUID_4_0_19","SQUID_4_0_2","SQUID_4_0_20","SQUID_4_0_21","SQUID_4_0_22","SQUID_4_0_23","SQUID_4_0_24","SQUID_4_0_25","SQUID_4_0_3","SQUID_4_0_4","SQUID_4_0_5","SQUID_4_0_6","SQUID_4_0_7","SQUID_4_0_8","SQUID_4_0_9","SQUID_4_1","SQUID_4_2","SQUID_4_3","SQUID_4_4","SQUID_4_5","SQUID_4_6","SQUID_4_7","SQUID_5_0_1","take00"],"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"16.04"}]},{"events":[{"introduced":"0"},{"last_affected":"18.04"}]},{"events":[{"introduced":"0"},{"last_affected":"19.10"}]},{"events":[{"introduced":"0"},{"last_affected":"20.04"}]},{"events":[{"introduced":"0"},{"last_affected":"9.0"}]},{"events":[{"introduced":"0"},{"last_affected":"10.0"}]},{"events":[{"introduced":"0"},{"last_affected":"15.1"}]}],"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2019-12521.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}