Regular Expression Denial of Service Vulnerability in Node-PostCSS Package

node-postcss Updated 02 Oct 2025

Summary

12/04/2021
N/A
No i
Medium
5.3

UBUNTU-CVE-2021-23368: The package postcss from 7.0.0 and before 8.2.10 are vulnerable to Regular Expression Denial of Service (ReDoS) during source map parsing. Affects node-postcss versions 8.2.1+~cs5.3.23-8 – 8.4.6+~cs7.3.21-1. No fix is published. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Node-PostCSS is a popular tool used in web development for transforming CSS with JavaScript plugins. It allows developers to write CSS in a more modular and maintainable way. However, certain versions of this package are vulnerable to a Regular Expression Denial of Service (ReDoS) attack, which can lead to performance degradation and service unavailability.

Vulnerability Detail

The vulnerability arises from the postcss package, which is utilized by Node-PostCSS. Versions from 7.0.0 up to, but not including, 8.2.10 are susceptible to ReDoS during source map parsing. This can allow an attacker to exploit the regular expressions used in the parsing process, causing the application to hang or crash due to excessive resource consumption. The potential ramifications include denial of service, where legitimate users are unable to access the service, leading to a poor user experience and potential financial losses.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If an immediate update is not feasible, consider implementing input validation to limit the complexity of the CSS being processed, thereby reducing the risk of exploitation. Additionally, monitor your application for unusual behavior that may indicate an attack.

Conclusion

The Regular Expression Denial of Service vulnerability in the Node-PostCSS package poses a significant risk to applications relying on this tool. It is crucial for developers to update to the latest patched version to mitigate the risk and ensure the stability of their applications.

See every vulnerability recorded for node-postcss →

Share this vulnerability

FAQ

ReDoS is a type of denial-of-service attack that exploits the way regular expressions are processed, causing the application to consume excessive CPU resources and potentially crash.

Node-PostCSS versions from 7.0.0 to 8.2.10 are vulnerable to this issue.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Failure to address this vulnerability may lead to service disruptions, affecting user access and potentially resulting in financial losses.

The CVSS score for this vulnerability is 5.3, indicating a medium severity level.

Related vulnerabilities

Recent vulnerabilities recorded for node-postcss.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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