fix(whatsapp): bump baileys to >=7.0.0-rc13 to clear GHSA-qvv5-jq5g-4cgg - #45957
fix(whatsapp): bump baileys to >=7.0.0-rc13 to clear GHSA-qvv5-jq5g-4cgg#45957cihuyyama wants to merge 1 commit into
Conversation
The bridge currently pins Baileys at commit 01047debd81beb20da7b7779b08edcb06aa03770, which resolves to baileys@7.0.0-rc.9. That falls inside the affected range of GHSA-qvv5-jq5g-4cgg (critical: message upsert / hist sync spoofing and app state corruption via crafted protocolMessage payload). Range affected: 7.0.0-rc.1 through 7.0.0-rc11. Fix is published upstream as baileys@7.0.0-rc13 on npm (released ~2026-05-20). npm audit fix can't help us today because git-SHA pins are immutable to npm's resolver. Switch the dependency to the npm registry alias (npm:baileys@^7.0.0-rc13). This: * clears the critical advisory (npm audit -> 0 vulnerabilities) * keeps the @whiskeysockets/baileys import path so bridge.js needs no code changes * gets us back on a tagged release line, so future audits work Mirrors the pattern from #19204 (pin protobufjs >=7.5.5 via overrides) and the existing dependabot-style PRs (#28889, #28975) for this bridge. Verified locally on Windows 11 / Node v22.22.3: * npm install -> 142 packages, 0 vulnerabilities * import smoke test for the 5 names bridge.js consumes: makeWASocket, useMultiFileAuthState, DisconnectReason, fetchLatestBaileysVersion, downloadMediaMessage all resolve with the expected types. Note: package-lock.json diff is large because rc.9 -> rc13 brings new transitive dep versions (libsignal rename, protobufjs 7.6.x, ws 8.21, pino 9.3, @img/sharp 0.35, etc.). Those are all pulled straight from baileys@7.0.0-rc13's own lockfile resolution; no manually-added dependencies. Refs: GHSA-qvv5-jq5g-4cgg
|
Duplicate of #43840 — both bump the WhatsApp bridge |
|
Closing as duplicate of #43840 by @poisdahl, which was opened earlier (June 10) with the same one-file fix bumping Baileys to #43840 has passing CI and covers the identical change. Keeping the upstream surface focused on the earlier PR. |
|
Thanks @alt-glitch for the heads-up and the cross-link to #43840 / #43814 — closing this as a duplicate. Apologies for the noise; I missed #43840 in my pre-submit search since its title leads with the LID-addressed group send fix rather than the GHSA-qvv5-jq5g-4cgg advisory. #43840 is the correct PR to land — it's already approved by @austinpickett, bumps to the same rc13, and additionally cleans up the transitive deps (libsignal -> npm, whatsapp-rust-bridge, protobufjs) which my one-liner did not. Closing in favor of #43840. Looking forward to seeing it merged. |
What does this PR do?
Clears critical advisory GHSA-qvv5-jq5g-4cgg in the WhatsApp bridge by switching
@whiskeysockets/baileysfrom a SHA pin (resolving to7.0.0-rc.9) to the npm registry aliasnpm:baileys@^7.0.0-rc13.The advisory is "message upsert / hist sync spoofing and app state corruption via crafted
protocolMessagepayload". Affected range:>=7.0.0-rc.1 <7.0.0-rc12-- i.e.rc.1throughrc11are vulnerable,rc12and later are clean. The current pin (01047debd...) resolves torc.9, squarely inside the affected range.npm audit fixcannot help because git-SHA pins are immutable to npm's resolver, so every fresh install via the official Windows installer leavesnpm auditreporting1 critical severity vulnerability.Does this regress the
cc4b1f000workaround? No. That commit pinned tofix/abprops-abt-fetch"until the next Baileys release includes it". That branch was merged to Baileysmasteras PR WhiskeySockets/Baileys#2473 on 2026-04-24, well beforerc10. The abprops fix is present in every release fromrc10onward, includingrc13. This PR simply graduates that workaround onto the official release line.The npm alias keeps the
@whiskeysockets/baileysimport path, sobridge.jsneeds no code changes. Future patch releases inside^7.0.0-rc13will pull in automatically andnpm auditwill start working again for this bridge.Related Issue
No tracking issue exists. Filing the PR as-is per CONTRIBUTING.md (advisory is already public via GitHub Security; no private disclosure path needed).
Type of Change
Changes Made
scripts/whatsapp-bridge/package.json:scripts/whatsapp-bridge/package-lock.json: regenerated. Theoverrides.protobufjsfield from PR #19204 is preserved and still applies (the lockfile showsprotobufjs@7.6.4resolving through it). The diff is large (~530 lines) because rc.9 -> rc13 brings new transitive versions (libsignal renamed from@whiskeysockets/libsignal-node,protobufjs 7.5.6 -> 7.6.4,ws 8.20.0 -> 8.21.0,pino 9.2.0 -> 9.3.0,@img/sharp-* 0.34.5 -> 0.35.1,whatsapp-rust-bridge 0.5.2 -> 0.5.4). All pulled directly frombaileys@7.0.0-rc13's own resolution; no manually-added dependencies.No Python files touched, so the Python test suite is unaffected.
bridge.jsis untouched.How to test
Before this PR:
After this PR:
API surface preserved -- verified locally
bridge.jsconsumes Baileys via 5 named imports plus several methods on the constructed socket. All are present and correctly typed inrc13:Reproduce locally:
Platforms Tested
npm install(142 packages, 0 vulns) ->npm auditclean -> import smoke test pass -> socket-method smoke test pass -> existing paired session inwhatsapp/session/preserved (separate concern from the dep change).I don't have macOS or Linux setups to test on -- happy to defer to CI or a maintainer's local check. Risk surface for platform sensitivity is limited to Baileys' own native modules (
@img/sharp-*,whatsapp-rust-bridge); both already publish prebuilt binaries for the same matrix asrc.9.Notes
cc4b1f000) was a temporary workaround for WhiskeySockets/Baileys#2477 (the abprops bad-request issue). PR fix: defer streaming iteration linebreak to prevent blank line stacking #2473 fixed it and merged to Baileysmasteron 2026-04-24; that fix is in every tagged release fromrc10onward.cc4b1f000style, or splitting the lockfile churn into a separatechore(deps)follow-up. Just let me know.