CVE-2026-4800

NameCVE-2026-4800
DescriptionImpact: 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-lodash (PTS)bullseye4.17.21+dfsg+~cs8.31.173-1vulnerable
bookworm, trixie4.17.21+dfsg+~cs8.31.198.20210220-9vulnerable
forky, sid4.17.23+dfsg-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-lodashsource(unstable)(unfixed)

Notes

Fixed by: https://github.com/lodash/lodash/commit/879aaa93132d78c2f8d20c60279da9f8b21576d6 (4.18.0)
Followup for tests: https://github.com/lodash/lodash/commit/af634573030f979194871da7c68f79420992f53d (4.18.0)

Search for package or bug name: Reporting problems