Skip to content

fix(security): bump lodash from ~4.17.23 to ~4.18.0#833

Merged
Kikobeats merged 5 commits intomicrolinkhq:masterfrom
cmunozgar:fix/lodash-security-bump-4.18.0
Apr 14, 2026
Merged

fix(security): bump lodash from ~4.17.23 to ~4.18.0#833
Kikobeats merged 5 commits intomicrolinkhq:masterfrom
cmunozgar:fix/lodash-security-bump-4.18.0

Conversation

@cmunozgar
Copy link
Copy Markdown
Contributor

Summary

Widens the lodash dependency range from ~4.17.23 to ^4.18.0 in three packages to resolve two security vulnerabilities patched in lodash 4.18.0.

Closes #832

Vulnerabilities fixed

Code injection via _.template imports key names (High severity)

The fix for CVE-2021-23337 validated the variable option in _.template but left options.imports key names unvalidated — both paths flow into the same Function() constructor sink. An attacker who controls imports key names can execute arbitrary code at template compilation time. Additionally, assignInWith was used to merge imports, which enumerates inherited properties via for..in, making prototype-polluted keys reachable.

Patched in 4.18.0 by:

  • Validating importsKeys against reForbiddenIdentifierChars
  • Replacing assignInWith with assignWith (own properties only)

Prototype pollution via array path bypass in _.unset / _.omit (Medium severity)

The patch for CVE-2025-13465 only guarded against string key members. Passing array-wrapped path segments bypasses the check, allowing deletion of properties from Object.prototype, Number.prototype, and String.prototype.

Patched in 4.18.0.

Packages changed

Package Before After
@metascraper/helpers ~4.17.23 ^4.18.0
metascraper-iframe ~4.17.23 ^4.18.0
metascraper-logo ~4.17.23 ^4.18.0

Compatibility

lodash 4.18.0 is a semver-minor release — fully backwards compatible with 4.17.x. No API changes affect the usage in these packages.

cmunozgar and others added 4 commits April 13, 2026 11:53
lodash ~4.17.23 is affected by two security vulnerabilities patched
in 4.18.0:

- Code injection via _.template imports key names (bypass of the
  CVE-2021-23337 fix — untrusted imports key names flow into the
  same Function() sink as the variable option)

- Prototype pollution via array path bypass in _.unset / _.omit
  (array-wrapped segments bypass the string-only guard introduced
  in CVE-2025-13465)

Widen the range to ^4.18.0 in @metascraper/helpers, metascraper-iframe,
and metascraper-logo so consumers can resolve to the patched version
without resorting to overrides/resolutions.

Closes microlinkhq#832
@Kikobeats Kikobeats changed the title fix(security): bump lodash from ~4.17.23 to ^4.18.0 fix(security): bump lodash from ~4.17.23 to ~4.18.0 Apr 14, 2026
The load-iframe 'markup is correct' test was snapshotting the entire
HTML from a live third-party URL, causing frequent failures whenever
Transistor updated their player markup or asset hashes.

Replace the snapshot with structural assertions that verify the iframe
loads correctly without being coupled to third-party markup details.
@Kikobeats Kikobeats merged commit e89d9d3 into microlinkhq:master Apr 14, 2026
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: lodash pinned to ~4.17.23 — vulnerable to CVE-4615/CVE-4616 (code injection & prototype pollution)

2 participants