CVE-2021-24025CWE-122

Due to incorrect string size calculations inside the preg_quote function, a large input string passed to the function can trigger an integer overflow leading…

published March 10, 2021

CVSS
—
EPSS
2%
Percentile
76.5
In the wild
Unconfirmed
What it is

⚠️ A sneaky integer overflow lurks in the preg_quote function of HHVM. Just by tossing in a large string, you could trigger a heap overflow like a waiter dropping a towering stack of plates! 😱 Think of it like trying to pour too much liquid into a cup; once it overflows, everything around it gets messy. In this case, the large input string behaves just like that overflowing cup, causing a cascade of issues in memory allocation. An attacker could exploit this vulnerability, leading to potential crashes or unexpected behavior in applications using HHVM. While it doesn’t currently appear to be exploited in the wild, the memory management issues can lead to a chaotic environment for your server, making it easier for bad actors to take advantage of other weaknesses.

Put simply

Think of it like trying to pour too much liquid into a cup; once it overflows, everything around it gets messy. In this case, the large input string behaves just like that overflowing cup, causing a cascade of issues in memory allocation. The vulnerability arises from incorrect string size calculations in the preg_quote function, which causes an integer overflow with large input, leading to a heap overflow that can potentially be exploited.

What to do

An attacker could exploit this vulnerability, leading to potential crashes or unexpected behavior in applications using HHVM. While it doesn’t currently appear to be exploited in the wild, the memory management issues can lead to a chaotic environment for your server, making it easier for bad actors to take advantage of other weaknesses. To protect yourself, immediately upgrade to HHVM version 4.56.3 or later. Additionally, review your input validation practices to ensure that large inputs do not compromise your system. Regularly check for updates and patches to stay ahead of potential vulnerabilities. You've got this! With these steps, you're well on your way to securing your environment. 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01659 · 76.5th percentile
Weakness
CWE-122 · Heap-based Buffer Overflow
Published
2021-03-10T15:50Z
EPSS history
Timeline
  • 10 MAR 15:50Z
    Due to incorrect string size calculations inside the preg_quote function, a large input string passed to the function can trigger an integer overflow leading…
    cvelistv5