Skip to content

Update dependency lodash.template to v4.18.0 [SECURITY]#27593

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-lodash.template-vulnerability
Open

Update dependency lodash.template to v4.18.0 [SECURITY]#27593
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-lodash.template-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 27, 2026

This PR contains the following updates:

Package Change Age Confidence
lodash.template (source) 4.5.04.18.0 age confidence

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

CVE-2026-4800 / GHSA-r5fr-rjxr-66jc

More information

Details

Impact

The fix for CVE-2021-23337 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.

The fix applies two changes:

  1. Validate importsKeys against the existing reForbiddenIdentifierChars regex (same check already used for the variable option)
  2. Replace assignInWith with assignWith when merging imports, so only own properties are enumerated
Workarounds

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

Severity

  • CVSS Score: 8.1 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

lodash/lodash (lodash.template)

v4.18.0

Compare Source


Configuration

📅 Schedule: (in timezone Etc/UTC)

  • Branch creation
    • ""
  • Automerge
    • Only on Sunday and Saturday (* * * * 0,6)
    • Between 12:00 AM and 12:59 PM, only on Monday (* 0-12 * * 1)
    • Between 10:00 PM and 11:59 PM, Monday through Friday (* 22-23 * * 1-5)
    • Between 12:00 AM and 04:59 AM, Tuesday through Saturday (* 0-4 * * 2-6)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/npm-lodash.template-vulnerability branch from 3f74505 to 7bf111a Compare April 29, 2026 09:48
@renovate renovate Bot changed the title Update dependency lodash.template to v4.18.0 [SECURITY] Update dependency lodash.template to v4.18.0 [SECURITY] - autoclosed Apr 30, 2026
@renovate renovate Bot closed this Apr 30, 2026
@renovate renovate Bot deleted the renovate/npm-lodash.template-vulnerability branch April 30, 2026 14:24
@renovate renovate Bot changed the title Update dependency lodash.template to v4.18.0 [SECURITY] - autoclosed Update dependency lodash.template to v4.18.0 [SECURITY] Apr 30, 2026
@renovate renovate Bot reopened this Apr 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-lodash.template-vulnerability branch 2 times, most recently from 7bf111a to 76c808d Compare April 30, 2026 15:36
@renovate renovate Bot changed the title Update dependency lodash.template to v4.18.0 [SECURITY] Update dependency lodash.template to v4.18.0 [SECURITY] - autoclosed May 5, 2026
@renovate renovate Bot closed this May 5, 2026
@renovate renovate Bot changed the title Update dependency lodash.template to v4.18.0 [SECURITY] - autoclosed Update dependency lodash.template to v4.18.0 [SECURITY] May 5, 2026
@renovate renovate Bot reopened this May 5, 2026
@renovate renovate Bot force-pushed the renovate/npm-lodash.template-vulnerability branch 2 times, most recently from 76c808d to 2c382dc Compare May 5, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants