Catégories
CVE-2026-102422 high CVSS 8.1

Injection de commande OS dans shell-quote (CVE-2026-102422)

Résumé

Injection de commande OS dans shell-quote (CVE-2026-102422). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via bash. Atténuation : mise à jour vers 1.11.0 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

Impact

quote() emits a { comment } token as # followed by its text, which comments out the rest of the shell line, including the opening quote of any later string token. A line terminator in that later string ends the comment, and the rest of the string is parsed as shell input:

quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#']);
// echo ok #x 'a
// id;#'

Passed to sh, bash, dash, ksh, or zsh, this runs id.

parse() emits a comment token for a # in the middle of a word (for example http://example.com/#frag), so callers that combine parse() output with another untrusted string, such as quote(parse(untrustedCommand).concat(untrustedArg)), are affected. The fix for CVE-2026-9277 rejected line terminators in the comment's own text, but not in the tokens after it.

Exploitation requires an attacker-controlled string containing a line terminator that follows a { comment } token in the same quote() call.

Patches

Fixed in v1.11.0: quote() throws a TypeError when a string after a { comment } token contains a line terminator (\n, \r, U+2028, or U+2029).

Workarounds

Drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings. Separately, do not append other shell text after quote() output that contains a comment, since the comment swallows it.

Source: NIST National Vulnerability Database NVD GitHub Advisory

Résumé généré automatiquement

Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.

Une vulnérabilité référencée CVE-2026-102422 a été découverte dans shell-quote.
Des attaquants peuvent cibler un point d'entrée spécifique comme bash à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 8.1/10.
Action : mettez à jour shell-quote vers 1.11.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « shell-quote CVE-2026-102422 » sur le site de l'éditeur.

CVE-2026-102422 (shell-quote) — CWE-78 / CVSS v3 8.1
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : bash / dash / ksh / zsh
Correctif : 1.11.0 — appliquer immédiatement
Contournement : Drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings.
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.

❓ Quel est le problème

Une injection de commande OS (CWE-78) affecte shell-quote. Les attaquants atteignent le code vulnérable via bash sans authentification.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de shell-quote. Surface d'attaque : bash / dash / ksh / zsh.

🔥 Gravité

Gravité : Élevée (CVSS 8.1/10). L'exploitation peut entraîner la prise de contrôle totale du système.

🔧 Comment corriger

Mettre à jour vers 1.11.0.

🛡️ Contournement

Contournement : Drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings.

🔍 Détection

Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.

Actions de réponse

Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre

  1. 1
    Identify exposure identify
    grep -r 'shell-quote' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で shell-quote を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    Drop every token after a `{ comment }` token before calling `quote()`, or reject line terminators in untrusted strings.

    パッチが適用されるまでの応急処置として、Drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade shell-quote to 1.11.0

    ステージング環境で 1.11.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Paquets affectés

npm shell-quote
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.11.0"}]}]

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus