fix: bump lodash to 4.18.1 (CVE-2026-4800) [ENG-14004]#25
Conversation
lodash <4.18.0 allows code injection via unsanitised options.imports key names in _.template(). Fixed in 4.18.0. Resolves ENG-14004. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@zapier/package.json`:
- Around line 12-18: Update the manifest-level lodash version constraint to a
fixed, auditable release instead of an open range: replace the "lodash" entries
currently set to ">=4.18.0" in both the dependencies block and the "overrides"
block with the exact version "4.18.1" (i.e., update the "lodash" value in
package.json for both places), then regenerate the lockfile (npm install / npm
ci) so package-lock.json reflects the pinned version.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 31045621-6397-40da-9507-c75da8fbf4e9
⛔ Files ignored due to path filters (1)
zapier/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
zapier/package.json
| "lodash": ">=4.18.0" | ||
| }, | ||
| "devDependencies": { | ||
| "jest": "^29.6.0" | ||
| }, | ||
| "overrides": { | ||
| "lodash": ">=4.17.23", | ||
| "lodash": ">=4.18.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Declared lodash constraints in zapier/package.json:"
python - <<'PY'
import json
p = json.load(open("zapier/package.json"))
print("dependencies.lodash =", p.get("dependencies", {}).get("lodash"))
print("overrides.lodash =", p.get("overrides", {}).get("lodash"))
PY
echo
echo "Resolved lodash versions in zapier/package-lock.json (if present):"
if [ -f zapier/package-lock.json ]; then
python - <<'PY'
import json
from collections import Counter
j = json.load(open("zapier/package-lock.json"))
versions = Counter()
# npm lockfile v2/v3 ("packages" map)
for pkg_path, meta in j.get("packages", {}).items():
if not isinstance(meta, dict):
continue
if pkg_path.endswith("node_modules/lodash") or meta.get("name") == "lodash":
v = meta.get("version")
if v:
versions[v] += 1
# fallback for older lockfiles ("dependencies" tree)
def walk(dep_map):
if not isinstance(dep_map, dict):
return
for name, node in dep_map.items():
if not isinstance(node, dict):
continue
if name == "lodash" and "version" in node:
versions[node["version"]] += 1
walk(node.get("dependencies", {}))
walk(j.get("dependencies", {}))
if versions:
for v, c in sorted(versions.items()):
print(f"{v}\t{c}")
else:
print("No lodash entries found.")
PY
else
echo "zapier/package-lock.json not found."
fiRepository: tinyfish-io/agentql-integrations
Length of output: 266
Pin lodash to 4.18.1 instead of using open-ended >=4.18.0.
While package-lock.json currently resolves to 4.18.1, the manifest-level constraint >=4.18.0 is non-deterministic and obscures the security remediation intent. For CVE-2026-4800, pinning the exact version makes the fix auditable and prevents drift.
Proposed fix
"dependencies": {
"agentql-js-common": "^0.0.1",
"zapier-platform-core": "^17",
- "lodash": ">=4.18.0"
+ "lodash": "4.18.1"
},
@@
"overrides": {
- "lodash": ">=4.18.0",
+ "lodash": "4.18.1",
"minimatch": "^3.1.3",
"picomatch": "^2.3.2"
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "lodash": ">=4.18.0" | |
| }, | |
| "devDependencies": { | |
| "jest": "^29.6.0" | |
| }, | |
| "overrides": { | |
| "lodash": ">=4.17.23", | |
| "lodash": ">=4.18.0", | |
| "lodash": "4.18.1" | |
| }, | |
| "devDependencies": { | |
| "jest": "^29.6.0" | |
| }, | |
| "overrides": { | |
| "lodash": "4.18.1", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@zapier/package.json` around lines 12 - 18, Update the manifest-level lodash
version constraint to a fixed, auditable release instead of an open range:
replace the "lodash" entries currently set to ">=4.18.0" in both the
dependencies block and the "overrides" block with the exact version "4.18.1"
(i.e., update the "lodash" value in package.json for both places), then
regenerate the lockfile (npm install / npm ci) so package-lock.json reflects the
pinned version.
Summary
Bumps
lodashfrom 4.17.23 → 4.18.1 to remediate CVE-2026-4800.Vulnerability:
_.templatedoes not validateoptions.importskey names, allowing code injection when untrusted input is passed as import keys. Fixed in 4.18.0 (validates keys viareForbiddenIdentifierChars+ usesassignWithinstead ofassignInWith).Severity: HIGH | SLA: 2026-05-03 | Linear: ENG-14004
Updated both
dependenciesandoverridesinzapier/package.jsonto>=4.18.0.Test plan
lodash@4.18.1inzapier/package-lock.json🤖 Generated with Claude Code