Vulnerability DatabaseGHSA-v238-c69x-9mmp

GHSA-v238-c69x-9mmp: 
JavaScript vulnerability analysis and mitigation

Summary

usePayOS().open() loaded any CHECKOUT_URL into the checkout iframe and accepted postMessage events from any window on an allowlisted origin. The allowlist included development origins in production. The return URL was concatenated into the iframe query string without encoding. A page able to post messages from an allowed origin, or a merchant integration that passes an attacker-influenced CHECKOUT_URL, could trigger the merchant's onSuccess/onCancel/onExit callbacks or load a non-payOS page in the checkout frame.

Affected versions

EcosystemPackageAffectedPatched
npm@payos/payos-checkout<= 1.0.81.0.9
npmpayos-checkout<= 1.0.9none
payos-checkout (unscoped) is deprecated, will not be patched; migrate to @payos/payos-checkout@1.0.9. The two packages share the same code.

Severity

Low — CVSS 3.1 base score 3.4, CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:N CWE-88, CWE-346, CWE-601, CWE-345.

Details

  • C1 (CWE-88): RETURN_URL was appended to the iframe URL without encoding. A return URL containing &, ? or # could inject or truncate iframe query parameters.
  • C2 (CWE-346): development and local origins were part of the production message-origin allowlist.
  • C3 (CWE-601): CHECKOUT_URL was assigned to iframe.src without checking its origin, scheme or path.
  • C5 (CWE-345): the message listener checked event.origin but not event.source. Any window on an allowed origin, not only the checkout iframe, could deliver payment_response events.

Fix

Version 1.0.9 makes these changes:

  • CHECKOUT_URL must be an https://pay.payos.vn/web/<id> payment link; development origins are no longer accepted. For any other URL, open() logs Invalid CHECKOUT_URL and does nothing.
  • The iframe URL is rebuilt from https://pay.payos.vn and the payment-link id, with redirect_uri set through URLSearchParams (encoded).
  • Messages are accepted only when event.source is the library's own iframe and event.origin is https://pay.payos.vn.
  • Only JSON objects are accepted as message data.
  • payment_response events must reference the opened payment link.
  • The listener is removed when the iframe closes. The public API (PayOSConfig, usePayOS(config) → { open, exit }) is unchanged. onSuccess is a UX signal only. It runs in the buyer's browser and can never prove payment. Merchants must confirm payment server-side through a verified webhook or the payment-link API before fulfilling an order.

Workarounds

Upgrade to @payos/payos-checkout@1.0.9. Until then:

  • pass only checkoutUrl values returned by your own server's create-payment-link call;
  • never fulfil an order from onSuccess; confirm payment server-side.

Credits

Vo Le Anh Tuan (Swinburne University of Technology), GitHub @tuankhongbietcode


Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-mw6w-2fmv-pvw3MEDIUM5.9
  • JavaScript logoJavaScript
  • @sveltejs/kit
NoYesNov 13, 2026
GHSA-jf9x-2fg2-hx4wMEDIUM5.9
  • JavaScript logoJavaScript
  • @sveltejs/adapter-static
NoYesNov 13, 2026
GHSA-5wg4-q3ww-283hMEDIUM5.9
  • JavaScript logoJavaScript
  • @sveltejs/adapter-cloudflare
NoYesNov 13, 2026
GHSA-rqw3-x7hx-mm3pMEDIUM5.9
  • JavaScript logoJavaScript
  • @sveltejs/adapter-node
NoYesNov 13, 2026
CVE-2026-128123MEDIUM5.9
  • JavaScript logoJavaScript
  • @sveltejs/adapter-node
NoYesNov 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management