Out-of-bounds write in squid (Alpine package)



Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2019-12521
CWE-ID CWE-787
Exploitation vector Network
Public exploit N/A
Vulnerable software
squid (Alpine package)
Operating systems & Components / Operating system package or component

Vendor Alpine Linux Development Team

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Out-of-bounds write

EUVDB-ID: #VU27667

Risk: Medium

CVSSv4.0: 6.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green]

CVE-ID: CVE-2019-12521

CWE-ID: CWE-787 - Out-of-bounds write

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due to a boundary error when processing untrusted input. 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.

Mitigation

Install update from vendor's website.

Vulnerable software versions

squid (Alpine package): 3.2.2-r0 - 4.13-r0

CPE2.3 External links

https://git.alpinelinux.org/aports/commit/?id=310093df82ce16968ddb899074be3a12d9c2ea7d
https://git.alpinelinux.org/aports/commit/?id=5e6172c90ca3b243a8f1143da08e3c2101764ba5
https://git.alpinelinux.org/aports/commit/?id=8370e6fc3428b622a561eb39affc43870ce0e99a


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###