CVE-2026-4800: Lodash `_.template` Arbitrary Code Injection — Broken 4.18.0 Patch Exposes Supply-Chain Patch-Pinning Risk

CVE-2026-4800 (TL-2026-2151), also tracked as Lodash _.template Code Injection (GHSA-r5fr-rjxr-66jc), is a high-severity software vulnerability scored CVSS 8.1, first published 2026-08-26. It has no confirmed attribution, affects lodash (OpenJS Foundation ecosystem project) lodash / lodash-es /, references 1 CVE (CVE-2026-4800), maps to 10 MITRE ATT&CK techniques (T1027.009, T1059.007, T1190), and is covered by 9 detection rules and 20 indicators of compromise.

Key facts for TL-2026-2151

Threat ID
TL-2026-2151
Also known as
Lodash _.template Code Injection (GHSA-r5fr-rjxr-66jc)
Severity
HIGH
CVSS
8.1 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)
Status
PATCHED
Category
VULNERABILITY
First published
2026-08-26
Last reviewed
2026-08-26
Attribution confidence
LOW
Motivation
UNKNOWN
Target sectors
technology, software development, enterprise it, industrial edge computing
Target regions
Global
Detection rules
9
Indicators of compromise
20

CVE-2026-4800, an arbitrary code injection in lodash's `_.template` via unvalidated `options.imports` key names, affected every published lodash/lodash-es/lodash-amd/lodash.template version through 4.17.23. The intended fix, 4.18.0 (Mar 31, 2026), broke real projects within a day because a build-tooling desync dropped the `assignWith` import from modular builds; a working fix shipped as 4.18.1 (Apr 1, 2026). Aikido Security's Aug 26, 2026 article pairs this episode with the 2024 xz-utils backdoor to argue organizations should pin and evaluate dependencies rather than auto-upgrade on defaults.

How CVE-2026-4800 works

CVE-2026-4800 (GHSA-r5fr-rjxr-66jc, CVSS 3.1 8.1; Snyk separately scores it CVSS 4.0 8.6, EPSS 2.76% / 86th percentile) is a code-injection vulnerability in lodash's `_.template` function. The 2021 fix for CVE-2021-23337 validated the `variable` option to close off `Function()`-constructor injection, but the same validation was never applied to `options.imports` key names. Because both `variable` and `imports` ultimately feed attacker-influenced strings into the `Function()` constructor, an application that passes untrusted input as an `options.imports` key can have arbitrary JavaScript executed at template-compilation time. The vulnerability is compounded by `_.template`'s use of `assignInWith` (a `for..in`-based merge that walks inherited properties): if `Object.prototype` has already been polluted elsewhere in an application, the polluted keys are pulled into the imports object and executed as well. The flaw affects lodash, lodash-es, lodash-amd, and lodash.template versions >=4.0.0 through 4.17.23; CWE-94 (Improper Control of Generation of Code) is the primary classification, with CWE-1321 (Prototype Pollution) as a contributing/compounding weakness. GHSA-r5fr-rjxr-66jc credits reporters dolevmiz1, bugbunny-research, M0nd0R, and threalwinky, with UlisesGascon, falsyvalues, jonchurch, and jdalton as the reviewing/fixing developers.

The patch shipped as lodash 4.18.0 on March 31, 2026 alongside other hardening (prototype-pollution fixes in `_.unset`/`_.omit`, regenerated modular packages) but introduced its own regression: lodash-cli's internal dependency mapping for modular builds fell out of sync, so `template.js` in lodash-es/lodash-amd/lodash.template called `assignWith` without importing it, throwing `ReferenceError: assignWith is not defined at template.js:169` (also affecting `fromPairs`). Because lodash's own unit tests didn't exercise that code path, the regression passed CI and reached npm; consumers such as html-webpack-plugin's child-compilation step (which calls `template()` on `index.html`, and is itself a transitive dependency of react-scripts) broke within a day, and GitHub issue #6167 — filed by user aaa-jeff on March 31, 2026 — tracked the failure the same day it shipped, cross-linking discussion #6174. Lodash maintainers merged the fix (commit `879aaa93132d78c2f8d20c60279da9f8b21576d6`, which both validates `importsKeys` against the existing `reForbiddenIdentifierChars` regex and replaces `assignInWith` with `assignWith` to stop walking inherited/polluted properties) and released 4.18.1 on April 1, 2026, restoring the missing internal wiring across all four modular packages; collaborator jonchurch confirmed the fix worked on discussion #6174 on April 2, 2026. npm's deprecation notice on the broken 4.18.0 release pointed affected consumers to pin back to 4.17.21 (still vulnerable to CVE-2026-4800, but functional) as an interim workaround before 4.18.1 was validated.

Aikido Security's article uses this sequence as a case study in supply-chain governance, pairing it with the 2024 xz-utils backdoor (CVE-2024-3094, CVSS 10.0; versions 5.6.0/5.6.1, safe line 5.4.x) as illustrative — not newly-reported — context. A pseudonymous maintainer persona, 'Jia Tan' (GitHub handle JiaT75), began building legitimate-looking contribution history around 2021 and was supported by a cluster of sock-puppet accounts ('Jigar Kumar', 'krygorin4545', 'misoeater91') that applied sustained pressure on the original maintainer, Lasse Collin, to hand over commit/release authority — a roughly two-to-three-year campaign that culminated in co-maintainer status by early 2023. On February 23, 2024, JiaT75 committed the backdoor: two dormant, compressed malicious binaries disguised as corrupted test files were embedded in the repository, and a malicious `build-to-host.m4` macro — present only in release tarballs, not in the git history itself — extracted and spliced them into the build during `dpkg`/`rpm` packaging on x86-64 Linux systems using glibc/GCC. The resulting backdoored `liblzma` hooked OpenSSH's `RSA_public_decrypt` via a GNU indirect-function (IFUNC) resolver — a code path OpenSSH only touches because several distributions patch it to interface with systemd via `libsystemd`, which links `liblzma` — letting a holder of a specific Ed448 private key bypass SSH authentication and execute code remotely; Alex Stamos characterized the exposure as a potential 'master key' to hundreds of millions of internet-facing systems. PostgreSQL developer Andres Freund began investigating anomalous SSH-login CPU usage and Valgrind errors on a Debian development system on March 27, 2024, and publicly disclosed the backdoor on March 29, 2024; the compromised 5.6.0/5.6.1 releases had reached Fedora Rawhide, Debian unstable, and an Ubuntu 24.04 LTS beta but had not yet reached stable production distributions. Lasse Collin released the official patched 5.6.2 on May 29, 2024. On April 15, 2024, OpenSSF and the OpenJS Foundation issued a joint alert on social-engineering maintainer-takeover attempts after OpenJS's Cross Project Council independently intercepted a similarly-patterned suspicious request for maintainer access on a popular JavaScript project and reported it to CISA — evidence the Jia Tan playbook was not an isolated incident. The compromise's tail proved long-lived: in August 2025, Binarly researchers found the CVE-2024-3094 backdoor still present in 35+ Docker Hub-hosted Linux images (12 directly compromised Debian images, plus others built transitively on top of them), with Debian declining to remove the flagged images. The article's thesis: 'most software runs on decisions nobody made' — teams that auto-upgrade on default get the lodash 4.18.0 regression, and teams that never re-evaluate a trusted maintainer get xz-utils; the fix in both cases is deliberate version pinning, targeted backporting of specific fixes without forcing a new base version, and continuously governed (not filed-away) SBOMs, with package evaluation gated at the point of entry before a developer, agent, or build system consumes it. Per the source article and hunt scoping, CVE-2024-3094 is cited only as comparative context and is intentionally NOT included in this record's `cve_list`.

As of the NVD record's last modification (Aug 25, 2026), CVE-2026-4800 does not appear in CISA's Known Exploited Vulnerabilities catalog — there is no confirmed evidence of active in-the-wild exploitation. The practical blast radius is nonetheless broad given lodash's ubiquity: for example, an IBM security bulletin lists CVE-2026-4800 (alongside CVE-2026-2950) as affecting bundled lodash/lodash-es in IBM Edge Data Collector, illustrating exposure reaching into edge/IoT-adjacent products, not just typical web/Node.js backends.

MITRE ATT&CK techniques used in TL-2026-2151

Defense Evasion

T1027.009 Embedded Payloads; T1574.006 Dynamic Linker Hijacking

Execution

T1059.007 JavaScript

Initial Access

T1190 Exploit Public-Facing Application; T1195.001 Compromise Software Dependencies and Development Tools; T1195.002 Compromise Software Supply Chain

Persistence

T1554 Compromise Host Software Binary

Credential Access

T1556 Modify Authentication Process

Resource Development

T1585.001 Social Media Accounts; T1608.001 Upload Malware

Affected products and versions in CVE-2026-4800

  • lodash (OpenJS Foundation ecosystem project) — lodash / lodash-es / lodash-amd / lodash.template
    Vulnerable versions: >=4.0.0, <=4.17.23; 4.18.0 (intended fix, but broken by a build regression)
    Fixed in: 4.18.1

Remediation for CVE-2026-4800

Patches

  • lodash / lodash-es / lodash-amd / lodash.template 4.18.1 — fixes both CVE-2026-4800 (options.imports validation) and the 4.18.0 assignWith regression

Immediate actions

  • Upgrade all lodash/lodash-es/lodash-amd/lodash.template installations directly to 4.18.1 (skip 4.18.0, which is a deprecated/broken release)
  • Audit codebases for any use of _.template where options.imports or options.variable key names can be influenced by untrusted/external input
  • Add lodash to actively-monitored SBOM entries rather than treating the SBOM as a static, filed-away compliance artifact

Workarounds

  • Do not pass untrusted or attacker-influenced input as options.imports or options.variable key names to _.template
  • If unable to upgrade immediately, avoid lodash-es/lodash-amd/lodash.template 4.18.0 specifically due to its build-breaking regression; remain on 4.17.21 with compensating controls (block untrusted input to _.template) until 4.18.1 is validated in your build

Longer-term hardening

  • Adopt deliberate version pinning for foundational dependencies instead of auto-upgrading on release defaults
  • Backport targeted security fixes onto a proven, pinned base version rather than jumping to an unvetted new release
  • Evaluate and gate new package versions at the point of entry (CI pipeline, build agent, developer install) before they are consumed, rather than trusting registry defaults
  • Treat aggressive, persistent requests for commit/maintainer access on open-source dependencies as a social-engineering warning sign, per the OpenSSF/OpenJS April 2024 guidance

CVEs associated with CVE-2026-4800

CVE-2026-4800

Weaknesses (CWE) in CVE-2026-4800

CWE-94, CWE-1321

Timeline of CVE-2026-4800

  • GitHub user 'Jia Tan' (JiaT75) creates an account and begins contributing to xz-utils-adjacent open-source projects, the start of a ~2-3 year trust-building campaign the article later cites alongside the lodash disclosure.
  • Jia Tan is granted co-maintainer / release authority on xz-utils after roughly 18 months of legitimate-looking contributions, aided by sock-puppet accounts ('Jigar Kumar', 'krygorin4545', 'misoeater91') pressuring original maintainer Lasse Collin to hand over control.
  • JiaT75 commits the malicious liblzma build-script backdoor to the xz-utils repository, including two dormant compressed malicious binaries disguised as corrupted test files.
  • xz-utils 5.6.1 ships with an updated version of the backdoor binary; 5.6.0 and 5.6.1 are the only compromised releases (5.4.x remains uncompromised).
  • PostgreSQL developer Andres Freund begins investigating anomalous SSH-login CPU usage and Valgrind errors on a Debian development system, the lead that surfaces the backdoor two days later.
  • Andres Freund publicly discloses the xz-utils backdoor to the Openwall mailing list; CVE-2024-3094 (CVSS 10.0) is assigned. Compromised releases had reached Fedora Rawhide, Debian unstable, and an Ubuntu 24.04 LTS beta, but not yet stable production distributions.
  • OpenSSF and the OpenJS Foundation issue a joint alert on social-engineering maintainer-takeover attempts, disclosing that OpenJS's Cross Project Council independently intercepted a similarly-patterned suspicious maintainer-access request on a popular JavaScript project and reported it to CISA.
  • Lasse Collin releases xz-utils 5.6.2, the official patched version fully remediating CVE-2024-3094.
  • Binarly researchers report that 35+ Docker Hub-hosted Linux images (12 directly compromised Debian images, others built transitively on top) still contain the xz-utils CVE-2024-3094 backdoor more than a year after disclosure; Debian declines to remove the flagged images.
  • GitHub issue #6167, filed by user aaa-jeff, reports that lodash-es 4.18.0's template() throws 'ReferenceError: assignWith is not defined', breaking consumers such as html-webpack-plugin (a transitive dependency of react-scripts) within a day of release.
  • GHSA-r5fr-rjxr-66jc / CVE-2026-4800 is disclosed for lodash's _.template options.imports code injection; lodash 4.18.0 ships the intended fix the same day but silently drops the assignWith import in modular builds.
  • lodash 4.18.1 is released (commit 879aaa9), restoring the missing internal dependency wiring and fixing the regression across lodash, lodash-es, lodash-amd, and lodash.template.
  • Lodash collaborator jonchurch confirms on discussion #6174 that 4.18.1 resolves the assignWith regression across all affected modular packages.
  • NVD's CVE-2026-4800 record is last modified; the vulnerability does not appear in CISA's Known Exploited Vulnerabilities catalog, indicating no confirmed active exploitation as of this date.
  • Aikido Security publishes 'Software Supply Chain Security: Decisions, Not Defaults,' pairing the lodash 4.18.0/4.18.1 episode with the 2024 xz-utils backdoor to argue for deliberate dependency pinning, backporting, and continuously governed SBOMs over blind auto-upgrades.

Sources cited for CVE-2026-4800

More in vulnerability

Detection coverage for TL-2026-2151

As of 2026-08-26, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-2151 across Splunk SPL, Microsoft KQL and Sigma, covering 20 indicator(s) of compromise. The whole corpus is readable without an account; a free account unlocks full detection query text in Splunk SPL, Microsoft KQL and Sigma; paid tiers add raw indicator values, correlation and the MCP server. Threadlinqs MCP server · View plans.

Further reading

Threadlinqs Intelligence — Real-Time Threat Detection Platform

[ 0 threats ] [ 0 det ] [ CRIT: 0 ] [ HIGH: 0 ]
// threat_feed
$ sort --newest
Showing all threats

Latest Threats