CVE-2020-7779: Regular Expression Denial of Service in djvalidator

djvalidator Updated 02 Oct 2025

Summary

09/02/2022
No i
High
7.5

CVE-2020-7779: Regular Expression Denial of Service in djvalidator. Affects djvalidator versions < 1.1.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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

djvalidator is an npm package that provides email validation functionality for Node.js applications. It is used to validate the format of email addresses and ensure they comply with the appropriate standards. However, all versions of djvalidator are vulnerable to a Regular Expression Denial of Service (ReDoS) attack. This vulnerability can be exploited by sending crafted invalid emails, causing the package to enter into an inefficient and time-consuming matching process.

Vulnerability Detail

The vulnerability in djvalidator arises from a lack of proper input validation when processing email addresses. By sending specially crafted invalid emails, an attacker can trigger a ReDoS attack, causing the package to consume excessive CPU resources and potentially leading to a denial of service condition. The vulnerability has a CVSS score of 7.5, indicating a high severity level. It is important to note that this vulnerability only affects versions 0.0.1 to 1.1.1 of djvalidator.

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 updating djvalidator is not immediately feasible, a temporary workaround is to implement additional input validation in your application to filter out potentially malicious or malformed email addresses before passing them to djvalidator. This can be done by using regular expressions or other validation techniques to ensure that only valid email addresses are processed by djvalidator.

Conclusion

In conclusion, djvalidator is vulnerable to a Regular Expression Denial of Service (ReDoS) attack when processing invalid emails. This can lead to excessive CPU usage and potentially result in a denial of service condition. It is crucial to update djvalidator to the latest version to mitigate this vulnerability. If immediate updating is not possible, implementing additional input validation in your application can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for djvalidator →

Share this vulnerability

FAQ

djvalidator is an npm package used for email validation in Node.js applications. It helps ensure that email addresses are in the correct format and comply with relevant standards.

The vulnerability in djvalidator allows an attacker to trigger a ReDoS attack by sending specially crafted invalid emails. This can lead to excessive CPU usage and potentially result in a denial of service condition.

Versions 0.0.1 to 1.1.1 of djvalidator are vulnerable to this ReDoS attack. It is recommended to update to the latest version to mitigate the vulnerability.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Yes, a temporary workaround is to implement additional input validation in your application to filter out potentially malicious or malformed email addresses before passing them to djvalidator.

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