Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm💎 RubyGems
Not in CISA KEV
HIGH severity

CVE-2026-4800

HIGHFix: lodash/lodash@3469357

CVE-2026-4800 is a high-severity (CVSS 8.1) Code Injection vulnerability in lodash. O3 Security confirms whether CVE-2026-4800 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

lodash vulnerable to Code Injection via `_.template` imports key names

Published
Mar 31, 2026
Updated
Aug 8, 2026
Affected
5 pkgs
Patched
3 / 5
Exploits
None indexed
Exploitation data as of Aug 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

5 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

lodashnpm
167.8Mdownloads / week
lodash-esnpm
43.5Mdownloads / week
lodash.templatenpm
4.5Mdownloads / week

Description

Impact:

The fix for CVE-2021-23337 (https://github.com/advisories/GHSA-35jh-r3h4-6jhm) added validation for the variable option in _.template but did not apply the same validation to options.imports key names. Both paths flow into the same Function() constructor sink.

When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time.

Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in. If Object.prototype has been polluted by any other vector, the polluted keys are copied into the imports object and passed to Function().

Patches:

Users should upgrade to version 4.18.0.

Workarounds:

Do not pass untrusted input as key names in options.imports. Only use developer-controlled, static key names.

Affected Packages

5 total 3 fixed
EcosystemPackageVulnerable rangeFix
📦npmlodashall versions4.17.21
📦npmlodash-esall versions4.17.21
📦npmlodash.templateall versionsNo fix
📦npmlodash-templateall versionsNo fix
💎RubyGemslodash-railsall versions4.17.21

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for lodash. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update lodash to 4.17.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-4800 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-4800 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-4800. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

Impact: The fix for CVE-2021-23337 (https://github.com/advisories/GHSA-35jh-r3h4-6jhm) added validation for the variable option in _.template but did not apply the same validation to options.imports key names. Both paths flow into the same Function() constructor sink. When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in. If Object.prototype has been pol
O3 Security · Impact-Aware SCA

Is CVE-2026-4800 in your dependencies?

O3 detects CVE-2026-4800 across npm, RubyGems dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

CVE-2026-4800: lodash Remote Code… | O3 Security