{"id":"UBUNTU-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-01-30T02:04:57.642662Z","published":"2020-04-15T19:15:00Z","related":["USN-4356-1"],"upstream":["CVE-2019-12521"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2019-12521"},{"type":"REPORT","url":"https://gitlab.com/jeriko.one/security/-/blob/master/squid/CVEs/CVE-2019-12521.txt"},{"type":"REPORT","url":"http://www.squid-cache.org/Advisories/SQUID-2019_12.txt"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-4356-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2019-12521"}],"affected":[{"package":{"name":"squid3","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/squid3@3.5.12-1ubuntu7.11?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.12-1ubuntu7.11"}]}],"versions":["3.3.8-1ubuntu16","3.3.8-1ubuntu17","3.5.12-1ubuntu6","3.5.12-1ubuntu7","3.5.12-1ubuntu7.1","3.5.12-1ubuntu7.2","3.5.12-1ubuntu7.3","3.5.12-1ubuntu7.4","3.5.12-1ubuntu7.5","3.5.12-1ubuntu7.6","3.5.12-1ubuntu7.7","3.5.12-1ubuntu7.8","3.5.12-1ubuntu7.9","3.5.12-1ubuntu7.10"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"squid","binary_version":"3.5.12-1ubuntu7.11"},{"binary_name":"squid-cgi","binary_version":"3.5.12-1ubuntu7.11"},{"binary_name":"squid-common","binary_version":"3.5.12-1ubuntu7.11"},{"binary_name":"squid-purge","binary_version":"3.5.12-1ubuntu7.11"},{"binary_name":"squid3","binary_version":"3.5.12-1ubuntu7.11"},{"binary_name":"squidclient","binary_version":"3.5.12-1ubuntu7.11"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-12521.json"}},{"package":{"name":"squid3","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/squid3@3.5.27-1ubuntu1.6?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.27-1ubuntu1.6"}]}],"versions":["3.5.23-5ubuntu1","3.5.23-5ubuntu2","3.5.27-1ubuntu1","3.5.27-1ubuntu1.1","3.5.27-1ubuntu1.2","3.5.27-1ubuntu1.3","3.5.27-1ubuntu1.4","3.5.27-1ubuntu1.5"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"3.5.27-1ubuntu1.6","binary_name":"squid"},{"binary_name":"squid-cgi","binary_version":"3.5.27-1ubuntu1.6"},{"binary_name":"squid-common","binary_version":"3.5.27-1ubuntu1.6"},{"binary_name":"squid-purge","binary_version":"3.5.27-1ubuntu1.6"},{"binary_name":"squid3","binary_version":"3.5.27-1ubuntu1.6"},{"binary_name":"squidclient","binary_version":"3.5.27-1ubuntu1.6"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-12521.json"}},{"package":{"name":"squid","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/squid@4.10-1ubuntu1.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.10-1ubuntu1.1"}]}],"versions":["4.8-1ubuntu2","4.8-1ubuntu3","4.9-2ubuntu1","4.9-2ubuntu2","4.9-2ubuntu3","4.9-2ubuntu4","4.10-1ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"squid","binary_version":"4.10-1ubuntu1.1"},{"binary_version":"4.10-1ubuntu1.1","binary_name":"squid-cgi"},{"binary_name":"squid-common","binary_version":"4.10-1ubuntu1.1"},{"binary_name":"squid-purge","binary_version":"4.10-1ubuntu1.1"},{"binary_name":"squidclient","binary_version":"4.10-1ubuntu1.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-12521.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}