· 5 min read

Baileys v7: what changed and how to keep a session current


Baileys has no published end-of-support date or support policy. “Baileys will remain in LTS through 2027,” a maintainer replied on GitHub on October 26, 2026. That reply is the one dated statement. On npm, legacy is the dist-tag of the 6.7.x line, and latest points to a v7 release candidate. To keep a self-hosted session current, run at least 6.7.22 or 7.0.0-rc12, the versions that patch a critical advisory. Then plan for v7’s LID and auth-state changes.

What the maintainers have said about support

The statement comes from issue #2877, opened on October 25, 2026 to ask whether Baileys is still maintained. The reply came the next day from an account with the “Member” badge of the WhiskeySockets organization. That account is listed first in the repo’s funding file. The reply reads “Baileys will remain in LTS through 2027”. The issue was closed as completed the same day.

The reply doesn’t say which version line the LTS covers, what LTS includes, or what happens after 2027. No README, release note, baileys.wiki page or npm text mentions 2027, an end of support or a deprecation of the project. The repository shows no pinned notice. Read the remark as one maintainer’s dated comment, and treat anything beyond its one sentence as unknown.

Where the version lines stand

Both package names on npm carry the same dist-tags (baileys, @whiskeysockets/baileys, accessed 2026-11-04):

npm dist-tag Version Release
latest 7.0.0-rc14 July 29, 2026, marked Latest on GitHub, no notes
legacy 6.7.24 6.7.24 (2026-07-29)

The word “legacy” is a tag name here. The rc12 release notes use it the same way, as “latest legacy version (6.7.22)”. The repo’s package.json now names the package baileys, unscoped, at 7.0.0-rc14, with "type": "module" and "node": ">=20.0.0". The README still says “Use the stable version:” with yarn add @whiskeysockets/baileys.

Version 7 has been a release candidate since at least November 2025. The rc10 notes (May 6, 2026) say Baileys “hasn’t been released since November 21, 2025”. The notes also route new pull requests to a develop branch. Once version 7 lands, the plan is “One patch per week” and “One minor release every 2 weeks”. Hotfixes go to master. The rc11 notes add “We are working on migrating away from the libsignal dep as soon as possible”. No date for a stable v7 is published.

The May 2026 advisory sets your minimum version

Advisory GHSA-qvv5-jq5g-4cgg, published May 20, 2026, is rated Critical. Its title is “Message upsert / hist sync spoofing and app state corruption using maliciously crafted protocolMessage payload”. A crafted placeholderResendMessage can trigger fake messages.upsert events, spoof messages and corrupt app-state sync. Affected versions are below 7.0.0-rc12 and below 6.7.22. The rc12 notes say “Please exercise extreme caution and upgrade to the latest version or latest legacy version (6.7.22).”

Check which version your project actually resolves, under either package name:

npm ls baileys @whiskeysockets/baileys

If you run Baileys inside another project, such as a self-hosted API server, its own package.json decides the version. Check that file, not only your own.

What changes when you move from 6.x to 7.x

The v7 migration guide lists the changes for anyone “upgrading from 6.x”:

Area What changes in 7.x
Signal sessions “By default, all new Signal sessions in Baileys 7.x are created in the LID format.”
Auth state Must support the lid-mapping, device-list and tctoken keys
PN to LID lookups getLIDForPN / getLIDsForPNs; onWhatsApp no longer returns LIDs
Message keys remoteJidAlt for DMs, participantAlt for groups, broadcasts and channels
Groups “every ID-bearing field now has a paired PN field”, such as owner and ownerPn
Contacts No separate jid and lid fields; id plus phoneNumber or lid
Helpers isJidUser removed in favor of isPnUser
Delivery ACKs “Baileys 7.x stops sending acknowledgments on successful message delivery.”
Modules “Baileys 7.x is ESM-only.”
Protobufs Only .create(), .encode() and .decode() remain

Seven of the ten rows above concern LIDs. The mapping store at sock.signalRepository.lidMapping offers getPNForLID, but “The getPNForLID lookup only succeeds for pairs Baileys has previously cached from inbound traffic.” The guide adds that PNs “are less reliable going forward”. A contact table keyed only on phone numbers can’t always resolve a LID sender back to a number. Key it on id and store the *Alt or *Pn field next to it. The identifier formats are explained in @lid vs JID. The new lid-mapping.update event carries a caveat: “this is not always emitted yet.”

The guide links the ACK change to WhatsApp banning accounts that sent those acknowledgments. What raises ban risk on a QR-connected number more broadly is in can a QR-connected WhatsApp number be banned.

For ESM, set "type": "module" in your package.json and run Node 20 or later. From CommonJS, the guide gives a dynamic import:

const { default: makeWASocket } = await import('@whiskeysockets/baileys')

Run that inside an async function. Serialize auth data with BufferJSON; plain JSON.stringify corrupts buffers. The guide calls coexistence support “somewhat experimental”.

Keep the session itself healthy

A current version doesn’t save a session whose credentials never reach disk. The troubleshooting page says “Failing to save updated credentials is the most common cause of unexpected session expiry.” Register sock.ev.on('creds.update', saveCreds) on every socket. The session management page says useMultiFileAuthState “is not recommended for deployment in production”. Move the auth state to a database-backed store, with the three v7 keys from the table above. Which disconnect codes mean reconnect and which mean a new QR is covered in Baileys disconnect codes, WAHA and Evolution API errors.

Plan for v8

The v8 migration page says “Baileys v8 is in active development.” It also warns that “Specifics may change before release”, and gives no ship date. Version 8 “replaces the current factory pattern with classes” and “is the foundation for adopting code from the whatsmeow project”.

The auth state changes again: “v8 ships a new auth state format.” The page orders the upgrade:

  1. Back up your existing auth state directory or database.
  2. Run the v8 migration helper in a separate script, not in your live process.
  3. Deploy the v8 runtime only after all clients have been migrated.

“Clients that have not been migrated will not connect on v8.” The page says nothing about how long 7.x will be supported after v8 ships.

If tracking release candidates, LID mappings and auth formats isn’t work you want to own, compare the trade-offs in Baileys and whatsapp-web.js vs the Cloud API. The steps for leaving are in migrating from Baileys to the Cloud API.

All GitHub, npm and baileys.wiki pages accessed 2026-11-04.

Z-API Omni team