CVE-2021-24025: facebook hhvm Heap-based Buffer Overflow
Vulnerability summary
CVE-2021-24025 is a critical (CVSS 9.8) Heap-based Buffer Overflow vulnerability in facebook hhvm. EPSS estimates a 1.66% chance of exploitation in the next 30 days, higher than 76.3% of scored vulnerabilities.
Timeline
- 10-03-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
Description
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 to a heap overflow. This issue affects HHVM versions prior to 4.56.3, all versions between 4.57.0 and 4.80.1, all versions between 4.81.0 and 4.93.1, and versions 4.94.0, 4.95.0, 4.96.0, 4.97.0, 4.98.0.
CVSS metrics
3 scores · 2 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.66%
Chance of exploitation in the next 30 days
Percentile
76%
Versus all other CVEs
30-day change
0.00 pp
From 1.66% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-190Integer Overflow or WraparoundThe product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Affected systems
Facebook1 product
- hhvm≥ 4.81.0, < unspecified | ≥ 4.57.0, < unspecified | ≥ unspecified, < 4.56.3 | < 4.56.3 | ≥ 4.57.0, ≤ 4.80.1 | ≥ 4.81.0, ≤ 4.93.1 | 4.94.0 | 4.95.0 | 4.96.0 | 4.97.0 | 4.98.0
Ubuntu1 product
- hhvmAll versions (No fix recorded)
2 vendors · 2 products
References
4 links- hhvm.com/blog/2021/02/25/security-update.htmlX Refsource MISCREPORTRelease NotesThird Party Advisory
- github.com/facebook/hhvm/commit/08193b7f0cd3910256e00d599f0f3eb2519c44caX Refsource MISCREPORTPatchThird Party Advisory