CVE-2020-7643: Prototype Pollution in paypal-adaptive

paypal-adaptive Updated 02 Oct 2025

Summary

10/12/2021
No i
Moderate
4.2

CVE-2020-7643: Prototype pollution in paypal-adaptive. Affects paypal-adaptive versions < 0.4.2. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

paypal-adaptive is an npm package that provides functionality for integrating PayPal's Adaptive Payments API into JavaScript applications. It allows developers to create and manage payments, refunds, and other related operations. The package is vulnerable to a prototype pollution attack, which can lead to the manipulation of JavaScript objects and the addition or modification of properties on Object.prototype.

Vulnerability Detail

The vulnerability in paypal-adaptive (version 0.4.2 and below) arises from a lack of proper input validation and sanitization. An attacker can exploit this by injecting a payload using the proto property, tricking the PayPal function into modifying or adding properties to the Object.prototype. This can result in unexpected behavior, such as the modification of existing object properties or the addition of new properties that can be abused for further attacks. The impact of this vulnerability can vary depending on how the affected code uses the manipulated objects.

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

As a workaround, developers can manually sanitize and validate input before passing it to the vulnerable code. This involves checking for and removing any malicious proto properties from the input objects. Here's an example of how this can be done in JavaScript:

function sanitizeInput(input) {
  if (typeof input === 'object' && input !== null) {
    delete input.__proto__;
    for (const key in input) {
      if (Object.prototype.hasOwnProperty.call(input, key)) {
        sanitizeInput(input[key]);
      }
    }
  }
}

Conclusion

The paypal-adaptive package (version 0.4.2 and below) is vulnerable to prototype pollution, which can be exploited to manipulate JavaScript objects and modify properties on Object.prototype. To mitigate this vulnerability, it is crucial to update the package to a version higher than 0.4.2. Additionally, developers can sanitize and validate input to prevent the injection of malicious proto properties. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for paypal-adaptive →

Share this vulnerability

FAQ

Prototype pollution is a vulnerability that occurs when an attacker can manipulate the prototype of an object. By modifying the prototype, the attacker can affect the behavior of all instances of that object, potentially leading to unexpected and malicious behavior.

Object.prototype is a built-in JavaScript object that serves as the prototype for all objects in JavaScript. It contains common properties and methods that are inherited by all objects.

An attacker can exploit this vulnerability by injecting a payload using the proto property. This payload can modify or add properties to the Object.prototype, leading to unexpected behavior in the code that uses the manipulated objects.

The consequences of this vulnerability can vary depending on how the affected code uses the manipulated objects. It can lead to unexpected behavior, data corruption, privilege escalation, or further exploitation of other vulnerabilities.

Yes, this vulnerability has been fixed in versions of paypal-adaptive higher than 0.4.2. It is recommended to update to the latest version to mitigate the risk.

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