CVE-2026-90896: Missing authentication in Ecommerce Template checkout session endpoint allows unauthenticated disclosure of buyer PII
Missing Authentication for Critical Function (CWE-306) in the checkout session lookup handler (src/app/api/stripe/checkoutsessions/route.ts), exposed at GET /api/stripe/checkoutsessions, in MarcosCamara01 Ecommerce Template before commit 91e273c allows a remote, unauthenticated attacker holding a valid Stripe Checkout Session id (cs...) to retrieve the full session object, including the buyer's name, email, phone, billing address, amount paid and internal userId, because the GET handler calls stripe.checkout.sessions.retrieve() and returns the result without checking for an authenticated session or session ownership. Sibling endpoints such as POST /api/stripe/payment already enforced authentication via auth.api.getSession(); this endpoint had no access control whatsoever. The sessionid is exposed in the buyer's own browser URL after payment (successurl = /result?sessionid={CHECKOUTSESSIONID}), so it leaks through Referer headers, analytics tools, server access logs and shared-machine browser history, resulting in disclosure of the buyer's personal data to an unauthenticated actor.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
MarcosCamara01 Ecommerce Templateto a version that resolves this vulnerability.Patch commit 91e273c - Compensating control
Ensure GET /api/stripe/checkout_sessions enforces authentication: require an authenticated session via auth.api.getSession(); if unauthenticated return 401. Then verify ownership by checking that checkoutSession.metadata.userId matches the authenticated user; if it does not match return 403 before calling stripe.checkout.sessions.retrieve() / returning the session object.
Event History
Frequently Asked Questions
What does an attacker need to retrieve a buyer's checkout details?
The attacker needs a valid Stripe Checkout Session ID beginning with cs_. No authentication or proof of ownership is required by the affected GET endpoint.
Which buyers are most likely exposed?
Buyers whose checkout session IDs are disclosed outside their own browser are exposed. The IDs may leak through Referer headers, analytics tools, server access logs, or browser history on shared machines.
What information can be disclosed?
The endpoint returns the full Stripe Checkout Session object, including the buyer's name, email address, phone number, billing address, amount paid, and internal userId.
Is the vulnerable endpoint protected by the application's normal payment authentication?
No. Although the sibling POST /api/stripe/payment endpoint checked authentication, GET /api/stripe/checkout_sessions had no access control or ownership validation.
What change addresses the issue?
Update to the version containing commit 91e273c. That commit is identified as the boundary after which the issue is no longer affected.