Vulnerability library
Security checkFebruary 12, 2024

Luxon Inefficient Regular Expression Complexity vulnerability

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmluxon

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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 is the same bug as Moment’s https://github.

Recommendation

Update the luxon package to the latest compatible version. Followings are version details:

  • Affected version(s): **>= 1.0.0, < 1.28.1 >= 3.0.0, < 3.2.1 >= 2.0.0, < 2.5.2**
  • Patched version(s): **1.28.1 3.2.1 2.5.2**

References

Could your website be exposed too?

SmartScanner can check your website for Luxon Inefficient Regular Expression Complexity vulnerability and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated February 12, 2024