Prototype Pollution Vulnerability in requirejs Package - CVE-2024-38998

requirejs Updated 02 Oct 2025

Summary

01/07/2024
N/A
No i
Unrated
Not published

CVE-2024-38998: Rejected reason: DO NOT USE THIS CANDIDATE NUMBER. Affects requirejs versions < 945ae6b41ef81851a030d93759bd36ac75a39958. 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

RequireJS is a JavaScript file and module loader that helps in managing dependencies and optimizing the loading of scripts in web applications. It allows developers to define modules and their dependencies, enabling better organization and performance of JavaScript code. However, the version 2.3.6 of requirejs has been found to be vulnerable to a prototype pollution issue, which can lead to severe security risks.

Vulnerability Detail

The vulnerability identified as CVE-2024-38998 in requirejs version 2.3.6 arises from a flaw in the 'config' function, which allows attackers to manipulate the prototype of objects. This prototype pollution can lead to arbitrary code execution or cause a Denial of Service (DoS) by injecting malicious properties into the object prototype chain. The implications of this vulnerability are significant, as it can compromise the integrity and availability of applications relying on this package.

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 immediate upgrading is not feasible, a temporary workaround is to avoid using the vulnerable 'config' function in your application until the package can be updated. Additionally, you can implement input validation to sanitize any configurations passed to the function, reducing the risk of exploitation.

Conclusion

The CVE-2024-38998 vulnerability in requirejs version 2.3.6 poses a significant risk due to its potential for prototype pollution, leading to arbitrary code execution and Denial of Service. It is crucial for developers using this package to update to a secure version promptly and consider implementing workarounds until the update can be applied.

See every vulnerability recorded for requirejs →

Share this vulnerability

FAQ

Prototype pollution is a security vulnerability that allows an attacker to manipulate the prototype of a base object, potentially leading to arbitrary code execution or application crashes.

You can use Vulert, which monitors open-source vulnerabilities in your software by analyzing your manifest file like package-lock.json. Visit Vulert Scanner to check for vulnerabilities without any signup.

Exploitation of this vulnerability can lead to arbitrary code execution, allowing attackers to execute malicious code within the context of your application, or cause a Denial of Service (DoS) by crashing the application.

Yes, you should upgrade to a version of requirejs that is later than 2.3.6, as the fix for this vulnerability has been implemented in subsequent releases.

The CVSS score for this vulnerability is 9.8, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for requirejs.

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