@shopify/shopify_function@2.0.1 pulls vulnerable lodash chain via @graphql-codegen/cli@5.0.6 (Dependabot PR #87 already exists)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
Start by reviewing Dependabot PR #87, which bumps @graphql-codegen/cli from 5.0.6 to 6.1.1, and compare it with the package dependency declaration. Run npm install and npm audit against the affected package; done means the lodash dependency chain and its reported advisories are cleared after the update is merged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
@shopify/shopify_function@2.0.1 exact-pins @graphql-codegen/cli@5.0.6, which transitively pulls @graphql-codegen/plugin-helpers@5.1.1, which depends on lodash@~4.17.0. Newer versions of plugin-helpers (6.2.1+, released 2026-04-04) drop the lodash dependency entirely. Bumping @graphql-codegen/cli to a current 6.x or 7.x release transitively resolves all 13 lodash-chain advisories that consuming projects see in npm audit.
PR #87 (Bump @graphql-codegen/cli from 5.0.6 to 6.1.1) has been open since 2026-01-12 and would fix this. It just needs review and merge.
Reproduction
In any project that depends on @shopify/shopify_function@2.0.1 (e.g. a Shopify Function extension generated via shopify app generate extension):
npm install
npm audit
Output (captured 2026-05-08):
13 high severity vulnerabilities
npm ls lodash confirms the chain:
└─┬ @shopify/shopify_function@2.0.1
└─┬ @graphql-codegen/cli@5.0.6
├─┬ @graphql-codegen/plugin-helpers@5.1.1
│ └── lodash@4.17.23
├─┬ @graphql-tools/prisma-loader@8.0.17
│ └── lodash@4.17.23 deduped
└─┬ inquirer@8.2.7
└── lodash@4.17.23 deduped
npm audit flags both GHSA-r5fr-rjxr-66jc (CVSS 8.1, code injection via _.template) and GHSA-f23m-r3pf-42rh (CVSS 6.5, prototype pollution in _.unset / _.omit). All 13 advisories report fixAvailable: false because @shopify/shopify_function@2.0.1 is the latest published version and exact-pins the codegen versions, so consuming npm install cannot bump the chain on its own.
Why this is awkward to work around downstream
Consumers can apply an npm overrides block to force lodash: "^4.18.1", which we did in our project. But every consuming Shopify Function project has to repeat the workaround. And each Dependabot scan still re-flags the chain because the override is invisible to the advisory database walker.
Proposed fix
Merge PR #87 (Bump @graphql-codegen/cli from 5.0.6 to 6.1.1), or open a fresh PR bumping @graphql-codegen/cli to ^7.0.0.
Why this works:
@graphql-codegen/cli@6.1.1declares@graphql-codegen/plugin-helpers: "^6.1.0". Caret resolution floats to the latest 6.x, currently6.3.0, which dropped the lodash dependency.@graphql-codegen/cli@7.0.0declares@graphql-codegen/plugin-helpers: "^7.0.0", also lodash-free.
Either path fully clears the 13 lodash-chain advisories without further dependency edits.
Severity (honest)
The deployed Wasm function does not include lodash or any @graphql-codegen/* package, so this is not a runtime exploit. The risk is dev-time only: developer machines and CI runners load the vulnerable lodash code when running npx graphql-codegen or shopify app function typegen. The actual exploit primitives in both advisories (_.template injection, _.unset / _.omit prototype pollution) are not reached by plugin-helpers@5.1.1, which calls lodash/merge.js only. So the realistic risk is "noise in npm audit output and Dependabot triage burden across every consuming project," not "active CVE in production."
Filing this anyway because:
- The fix is one Dependabot PR merge. Mechanical, low risk.
- A 4-month-old open Dependabot PR (#87) shouldn't be the bottleneck.
- Every consuming extension currently has to apply the same
overridesworkaround.
Versions
@shopify/shopify_function@2.0.1(latest, published 2026-01-30)- npm 10.x
- Reproduced on macOS 14.x, Node.js 22.x
Related
- Issue #23 (closed 2025-01-31): same package, different transitive vuln (ws chain). Maintainer fixed it in 1.0.4 within 2 days. Citing here to confirm the issue template / response loop works.
- Open PRs already addressing this: #87 (cli), #86 (typescript), #85 (typescript-operations).
- Ngôn ngữ chính
- TypeScript
- Star
- 35
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Shopify/shopify-function-javascript
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Shopify/shopify-function-javascript#127 · 1 bình luận ·
Tất cả issue của Shopify/shopify-function-javascript
Issue tương tự
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Đang mởclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supermomonga/zcode-acp#24 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
growthbook/growthbook#7100 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100