CVE-2019-12521

squid: Off-by-one error in addStackElement allows for heap buffer overflow and crash

Published Apr 15, 2020 CVSS 3.1 · 5.9 Medium EPSS 5.9% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2278-1 squid3 security update
Debian DSA Debian DSA DSA-4682-1 squid security update
EUVD EUVD EUVD-2019-4116 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.
Ubuntu USN Ubuntu USN USN-4356-1 Squid vulnerabilities
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 4, 2024, 11:24 PM
Reserved
Jun 2, 2019, 12:00 AM
Status
Modified
Published
Apr 15, 2020, 7:15 PM
Modified
Jun 17, 2026, 2:14 AM
Severity
Moderate
Public date
Apr 24, 2020, 12:00 AM