
Cloud Vulnerability DB
A community-led vulnerabilities database
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.
| Ecosystem | Package | Affected | Patched |
|---|---|---|---|
| npm | @payos/payos-checkout | <= 1.0.8 | 1.0.9 |
| npm | payos-checkout | <= 1.0.9 | none |
payos-checkout (unscoped) is deprecated, will not be patched; migrate to @payos/payos-checkout@1.0.9. The two packages share the same code. |
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.
RETURN_URL was appended to the iframe URL without encoding. A return URL containing &, ? or # could inject or truncate iframe query parameters.CHECKOUT_URL was assigned to iframe.src without checking its origin, scheme or path.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.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.https://pay.payos.vn and the payment-link id, with redirect_uri set through URLSearchParams (encoded).event.source is the library's own iframe and event.origin is https://pay.payos.vn.payment_response events must reference the opened payment link.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.Upgrade to @payos/payos-checkout@1.0.9. Until then:
checkoutUrl values returned by your own server's create-payment-link call;onSuccess; confirm payment server-side.Vo Le Anh Tuan (Swinburne University of Technology), GitHub @tuankhongbietcode
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."