CVE-2021-23392: Uncontrolled Resource Consumption in locutus

locutus Updated 02 Oct 2025

Summary

10/06/2021
Yes i
High
7.5

CVE-2021-23392: Uncontrolled Resource Consumption in locutus. Affects locutus versions < 2.0.15. Fixed in 2.0.15. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The locutus package is an npm package that provides JavaScript functions for emulating PHP functions. It allows developers to write PHP functions in JavaScript. The package is widely used in web development projects that require interoperability between PHP and JavaScript. However, versions of locutus before 2.0.15 are vulnerable to a Regular Expression Denial of Service (ReDoS) attack in the gopher_parsedir function.

Vulnerability Detail

The vulnerability in locutus arises from a lack of input validation in the gopher_parsedir function. An attacker can exploit this vulnerability by providing a specially crafted input that triggers a ReDoS attack. This can lead to a denial of service condition, where the application becomes unresponsive or crashes due to excessive CPU usage. The impact of this vulnerability can be severe, as it allows an attacker to disrupt the availability of the affected application.

How To Fix

Latest published version: 3.0.36 as of 23 Oct 2026

npm install locutus@3.0.36

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.0.15

This is the first release that contains the fix.

npm install locutus@2.0.15

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to update the locutus package to the latest version as soon as possible.

Conclusion

The locutus package before version 2.0.15 is vulnerable to a ReDoS attack in the gopher_parsedir function. This can lead to a denial of service condition in the affected application. It is crucial to update the locutus package to version 2.0.15 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for locutus →

Share this vulnerability

FAQ

Locutus is an npm package that provides JavaScript functions for emulating PHP functions.

The vulnerability allows an attacker to perform a ReDoS attack, leading to a denial of service condition in the affected application.

To fix this vulnerability, update the locutus package to version 2.0.15 or later.

There is no known workaround for this vulnerability. It is recommended to update the locutus package to the latest version.

Related vulnerabilities

Recent vulnerabilities recorded for locutus.

How To Fix

Latest published version: 3.0.36 as of 23 Oct 2026

npm install locutus@3.0.36

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.0.15

This is the first release that contains the fix.

npm install locutus@2.0.15

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback