Sploit.io - Search

Product: x-assign, version: < unspecified

CVE-2021-23452

Severity: HIGH

Description: This affects all versions of package x-assign. The global proto object can be polluted using the __proto__ object.

CVSS Score: 8.6

Priority

B

CISA Data

EPSS Data

  • EPSS: 0.005560000
  • Percentile: 0.679310000
  • Date: 2026-03-22

ExploitDB

No data available.

HackerOne Data

  • Rank: 8949
  • Reports submitted count: 0
  • Unknown: 0
  • None: 0
  • Low: 0
  • Medium: 0
  • High: 0
  • Critical: 0

GitHub PoCs

    Nuclei Templates

    No data available.

    VulnCheck Data

    Affected Products:

    • n/a x-assign - Versions: 0

    References:

    Risk Assessment

    1. Risk Assessment
    The vulnerability CVE-2021-23452 is a Prototype Pollution vulnerability affecting all versions of the x-assign JavaScript package. Prototype Pollution occurs when an attacker can modify the prototype of JavaScript objects, potentially altering the behavior of the application in unexpected ways. This vulnerability has a CVSS score of 8.6 (HIGH), indicating a significant risk. The attack vector is Network, meaning it can be exploited remotely without requiring local access. The attack complexity is Low, and no privileges or user interaction are required for successful exploitation. This makes it relatively easy to exploit. The vulnerability allows for High Confidentiality impact, meaning an attacker could potentially access sensitive data. It also allows for Low Integrity impact, potentially allowing an attacker to modify data. Finally, it has a Low Availability impact, indicating a potential for minor service disruption. The EPSS score of 0.005560000 suggests a moderate probability of exploitation in the wild. The business impact can range from information disclosure to application instability, depending on how x-assign is used within the application.

    2. Potential Attack Scenarios
    An attacker could exploit this vulnerability by injecting a malicious payload that modifies the prototype of a core JavaScript object, such as Object.prototype. For example, consider an application using x-assign to merge user-provided configuration options. An attacker could craft a configuration object containing a `__proto__` property with a malicious value. When x-assign merges this configuration, the global Object.prototype is polluted. This could then affect all subsequent object creations in the application. A specific attack process would involve sending a specially crafted JSON payload to a server-side application utilizing x-assign, for instance, during an API request. This payload would include the malicious `__proto__` property. The application, using x-assign, merges this payload into an existing object, polluting the prototype. The potential outcome could be that the attacker can then access or modify properties on any object in the application, potentially leading to information disclosure (e.g., session cookies, internal data) or even remote code execution if the polluted prototype is used in a vulnerable way.

    3. Mitigation Recommendations
    The primary mitigation for this vulnerability is to upgrade to a patched version of x-assign if one is available. Currently, the version is listed as less than "unspecified" meaning any update is beneficial. If a direct upgrade isn’t immediately feasible, consider the following: Implement input validation to sanitize user-provided data, especially when merging objects using x-assign. Specifically, filter out or properly escape the `__proto__` property from incoming data. Utilize a JavaScript runtime environment that provides built-in protection against prototype pollution. Consider using a more robust object merging library that offers better protection against prototype pollution attacks. Refer to the Snyk advisory for more detailed information and potential patches: https://snyk.io/vuln/SNYK-JS-XASSIGN-1759314. The runkit embed provides a quick demonstration of the vulnerability: https://runkit.com/embed/sq8qjwemyn8t.

    4. Executive Summary
    CVE-2021-23452 is a HIGH severity Prototype Pollution vulnerability in the x-assign JavaScript package. This vulnerability allows attackers to potentially gain access to sensitive data or disrupt application functionality by manipulating the prototype of JavaScript objects. It’s relatively easy to exploit remotely without requiring any user interaction. The impact to the business could range from minor service disruption to significant data breaches. We recommend upgrading to the latest version of x-assign as soon as possible. If an immediate upgrade isn’t possible, implement robust input validation to sanitize user-provided data, specifically filtering the `__proto__` property. Addressing this vulnerability is critical to maintaining the security and stability of applications using the x-assign package, and reducing the risk of potential data compromise or service disruption. Prompt action is recommended to minimize potential business impact.