CVE-2022-31180 Vulnerability Analysis & Exploit Details

CVE-2022-31180
Vulnerability Scoring

9.8
/10
Critical Risk

As a catastrophic security flaw, CVE-2022-31180 has severe implications, demanding immediate intervention.

Attack Complexity Details

  • Attack Complexity: Low
    Exploits can be performed without significant complexity or special conditions.
  • Attack Vector: Network
    Vulnerability is exploitable over a network without physical access.
  • Privileges Required: None
    No privileges are required for exploitation.
  • Scope: Unchanged
    Exploit remains within the originally vulnerable component.
  • User Interaction: None
    No user interaction is necessary for exploitation.

CVE-2022-31180 Details

Status: Modified

Last updated: 🕖 21 Nov 2024, 07:04 UTC
Originally published on: 🕗 01 Aug 2022, 20:15 UTC

Time between publication and last update: 842 days

CVSS Release: version 3

CVSS3 Source

security-advisories@github.com

CVSS3 Type

Secondary

CVSS3 Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE-2022-31180 Vulnerability Summary

CVE-2022-31180: Shescape is a simple shell escape package for JavaScript. Affected versions were found to have insufficient escaping of white space when interpolating output. This issue only impacts users that use the `escape` or `escapeAll` functions with the `interpolation` option set to `true`. The result is that if an attacker is able to include whitespace in their input they can: 1. Invoke shell-specific behaviour through shell-specific special characters inserted directly after whitespace. 2. Invoke shell-specific behaviour through shell-specific special characters inserted or appearing after line terminating characters. 3. Invoke arbitrary commands by inserting a line feed character. 4. Invoke arbitrary commands by inserting a carriage return character. Behaviour number 1 has been patched in [v1.5.7] which you can upgrade to now. No further changes are required. Behaviour number 2, 3, and 4 have been patched in [v1.5.8] which you can upgrade to now. No further changes are required. The best workaround is to avoid having to use the `interpolation: true` option - in most cases using an alternative is possible, see [the recipes](https://github.com/ericcornelissen/shescape#recipes) for recommendations. Alternatively, users may strip all whitespace from user input. Note that this is error prone, for example: for PowerShell this requires stripping `'\u0085'` which is not included in JavaScript's definition of `\s` for Regular Expressions.

Assessing the Risk of CVE-2022-31180

Access Complexity Graph

The exploitability of CVE-2022-31180 depends on two key factors: attack complexity (the level of effort required to execute an exploit) and privileges required (the access level an attacker needs).

Exploitability Analysis for CVE-2022-31180

With low attack complexity and no required privileges, CVE-2022-31180 is an easy target for cybercriminals. Organizations should prioritize immediate mitigation measures to prevent unauthorized access and data breaches.

Understanding AC and PR

A lower complexity and fewer privilege requirements make exploitation easier. Security teams should evaluate these aspects to determine the urgency of mitigation strategies, such as patch management and access control policies.

Attack Complexity (AC) measures the difficulty in executing an exploit. A high AC means that specific conditions must be met, making an attack more challenging, while a low AC means the vulnerability can be exploited with minimal effort.

Privileges Required (PR) determine the level of system access necessary for an attack. Vulnerabilities requiring no privileges are more accessible to attackers, whereas high privilege requirements limit exploitation to authorized users with elevated access.

CVSS Score Breakdown Chart

Above is the CVSS Sub-score Breakdown for CVE-2022-31180, illustrating how Base, Impact, and Exploitability factors combine to form the overall severity rating. A higher sub-score typically indicates a more severe or easier-to-exploit vulnerability.

CIA Impact Analysis

Below is the Impact Analysis for CVE-2022-31180, showing how Confidentiality, Integrity, and Availability might be affected if the vulnerability is exploited. Higher values usually signal greater potential damage.

  • Confidentiality: High
    Exploiting CVE-2022-31180 can result in unauthorized access to sensitive data, severely compromising data privacy.
  • Integrity: High
    CVE-2022-31180 could allow unauthorized modifications to data, potentially affecting system reliability and trust.
  • Availability: High
    CVE-2022-31180 can disrupt system operations, potentially causing complete denial of service (DoS).

Exploit Prediction Scoring System (EPSS)

The EPSS score estimates the probability that this vulnerability will be exploited in the near future.

EPSS Score: 0.403% (probability of exploit)

EPSS Percentile: 73.9% (lower percentile = lower relative risk)
This vulnerability is less risky than approximately 26.099999999999994% of others.

CVE-2022-31180 References

External References

CWE Common Weakness Enumeration

NVD-CWE-Other

Vulnerable Configurations

  • cpe:2.3:a:shescape_project:shescape:1.4.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.4.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.0:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.0:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.1:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.1:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.2:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.2:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.3:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.3:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.4:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.4:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.5:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.5:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.6:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.6:*:*:*:*:node.js:*:*
  • cpe:2.3:a:shescape_project:shescape:1.5.7:*:*:*:*:node.js:*:*
    cpe:2.3:a:shescape_project:shescape:1.5.7:*:*:*:*:node.js:*:*

Protect Your Infrastructure against CVE-2022-31180: Combat Critical CVE Threats

Stay updated with real-time CVE vulnerabilities and take action to secure your systems. Enhance your cybersecurity posture with the latest threat intelligence and mitigation techniques. Develop the skills necessary to defend against CVEs and secure critical infrastructures. Join the top cybersecurity professionals safeguarding today's infrastructures.

Other 5 Recently Published CVEs Vulnerabilities

  • CVE-2025-3799 – A vulnerability, which was classified as critical, was found in WCMS 11. Affected is an unknown function of the file app/controllers/AnonymousContr...
  • CVE-2025-3798 – A vulnerability, which was classified as critical, has been found in WCMS 11. This issue affects the function sub of the file app/admin/AdvadminCon...
  • CVE-2025-3661 – The SB Chart block plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the ‘className’ parameter in all versions up to, and inclu...
  • CVE-2025-3404 – The Download Manager plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the savePackage func...
  • CVE-2021-4455 – The Wordpress Plugin Smart Product Review plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in all v...