CVE-2021-21304: Prototype Pollution in Dynamoose

dynamoose Updated 02 Oct 2025

Summary

08/02/2021
Yes i
High
7.2

CVE-2021-21304: Prototype Pollution in Dynamoose. Affects dynamoose versions >= 2.0.0, < 2.7.0. Fixed in 2.7.0. 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

Dynamoose is an npm package that provides an easy-to-use modeling tool for Amazon DynamoDB. It simplifies the interaction with DynamoDB by abstracting away the low-level details. Dynamoose versions 2.0.0-2.6.0 are affected by a prototype pollution vulnerability in the internal utility method lib/utils/object/set.ts. This method is extensively used throughout the codebase for various operations. The vulnerability does not impact v1.x.x and also affects v2.x.x beta/alpha versions.

Vulnerability Detail

The prototype pollution vulnerability in Dynamoose can lead to various security issues. By manipulating the prototype of an object, an attacker can inject or modify properties and methods, potentially leading to remote code execution, denial of service, or information disclosure. The vulnerable method set.ts is responsible for setting properties in objects, making it a critical point of exploitation.

How To Fix

Minimum fixed version

2.7.0

This is the first release that contains the fix.

npm install dynamoose@2.7.0

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

Workaround

There are no known workarounds to patch this vulnerability other than upgrading to v2.7.0 or greater.

Conclusion

The prototype pollution vulnerability in Dynamoose versions 2.0.0-2.6.0 and v2.x.x beta/alpha versions can have severe security implications. It is crucial to upgrade to version 2.7.0 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for dynamoose →

Share this vulnerability

FAQ

The vulnerability can be exploited to manipulate object prototypes, potentially leading to remote code execution, denial of service, or information disclosure.

No, the vulnerability affects Dynamoose versions 2.0.0-2.6.0 and v2.x.x beta/alpha versions. It does not impact v1.x.x.

No, there is no evidence of this vulnerability being exploited at the moment.

For more information, you can contact the developer at https://charlie.fish/contact or refer to the project's Security Policy at https://github.com/dynamoose/dynamoose/blob/master/SECURITY.md.

The vulnerability has a severity rating of HIGH with a CVSS score of 7.2.

How To Fix

Minimum fixed version

2.7.0

This is the first release that contains the fix.

npm install dynamoose@2.7.0

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