CVE-2022-31180CWE-74

Insufficient escaping of whitespace in shescape

Critical · published August 1, 2022

CVSS v3.1
9.8
EPSS
2%
Percentile
80.5
In the wild
Unconfirmed
What it is

🚨 A sneaky whitespace oversight in Shescape lets attackers slip in shell commands like a magician pulling a rabbit out of a hat! 🔥 Think of it as a restaurant that doesn't double-check the orders. If a chef mistakenly interprets a note with extra spaces as a special request, they could serve a dish that’s downright dangerous! 🍽️ With this vulnerability, an attacker could execute arbitrary commands simply by including clever whitespace in their input. This opens the door to potentially catastrophic mishaps—imagine an intruder hijacking server processes or stealing sensitive data without a trace! This is absolutely devastating!

Put simply

Think of it as a restaurant that doesn't double-check the orders. If a chef mistakenly interprets a note with extra spaces as a special request, they could serve a dish that’s downright dangerous! 🍽️ This vulnerability arises from insufficient escaping of whitespace in Shescape's `escape` and `escapeAll` functions when the `interpolation` option is enabled. It allows attackers to invoke shell-specific behaviors and execute arbitrary commands through specially crafted input.

What to do

With this vulnerability, an attacker could execute arbitrary commands simply by including clever whitespace in their input. This opens the door to potentially catastrophic mishaps—imagine an intruder hijacking server processes or stealing sensitive data without a trace! This is absolutely devastating! Upgrade to Shescape v1.5.7 or v1.5.8 immediately to patch the vulnerabilities. If possible, avoid using the `interpolation: true` option, or strip all whitespace from user input—just be cautious with edge cases! You've got this! Follow these steps to secure your application, and become a security hero today! 🦸‍♂️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01993 · 80.5th percentile
Weakness
CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Published
2022-08-01T19:15Z
EPSS history
Timeline
  • 01 AUG 19:15Z
    Insufficient escaping of whitespace in shescape
    cvelistv5