ghsa-vh3f-qppr-j97f
Vulnerability from github
Summary
The lack of sanitization of URLs protocols in the createLink.openLink
function enables the execution of arbitrary JavaScript code within the context of the parent page.
Details
https://github.com/FrontFin/mesh-web-sdk/blob/cf013b85ab95d64c63cbe46d6cb14695474924e7/packages/link/src/Link.ts#L441
The createLink.openLink
function takes base64 encoded links, decodes them, and then sets the resulting string as the src
attribute of an iframe
. It’s important to note that the protocol part is not validated, so a payload, which is a valid URL, such as javascript:alert(document.domain)//
, can be provided to the function.
PoC
- Extract poc-mesh-web-sdk.zip
- Run
yarn install
and thenyarn start
- Paste this payload inside the input box:
amF2YXNjcmlwdDphbGVydCh3aW5kb3cucGFyZW50LmRvY3VtZW50LmJvZHkuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImgyIikuaXRlbSgwKVsiaW5uZXJIVE1MIl0pLy8=
- Click on the OpenLink button
- Notice the alert box and ability to access the
h2
title from the parent page
It can also be verified via https://paylink.meshconnect.com/?linkToken=amF2YXNjcmlwdDphbGVydCgpLy8=
.
Impact
This is technically indistinguishable from a real page at the rendering level and allows access to the parent page DOM, storage, session, and cookies. If the attacker can specify customIframeId
, they can hijack the source of existing iframes.
If access to the private key is possible or if transactions are tampered with or initialized, in a wallet context, it can result in a critical impact due to loss of funds scenarios.
Reporters
{ "affected": [ { "package": { "ecosystem": "npm", "name": "@meshconnect/web-link-sdk" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "3.3.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-59430" ], "database_specific": { "cwe_ids": [ "CWE-79" ], "github_reviewed": true, "github_reviewed_at": "2025-09-22T21:09:27Z", "nvd_published_at": "2025-09-22T19:16:23Z", "severity": "HIGH" }, "details": "### Summary\nThe lack of sanitization of URLs protocols in the `createLink.openLink` function enables the execution of arbitrary JavaScript code within the context of the parent page.\n### Details\nhttps://github.com/FrontFin/mesh-web-sdk/blob/cf013b85ab95d64c63cbe46d6cb14695474924e7/packages/link/src/Link.ts#L441\nThe `createLink.openLink` function takes base64 encoded links, decodes them, and then sets the resulting string as the `src` attribute of an `iframe`. It\u2019s important to note that the protocol part is not validated, so a payload, which is a valid URL, such as `javascript:alert(document.domain)//`, can be provided to the function.\n\n### PoC\n1. Extract [poc-mesh-web-sdk.zip](https://github.com/user-attachments/files/22223079/poc-mesh-web-sdk.zip)\n2. Run `yarn install` and then `yarn start`\n3. Paste this payload inside the input box: `amF2YXNjcmlwdDphbGVydCh3aW5kb3cucGFyZW50LmRvY3VtZW50LmJvZHkuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImgyIikuaXRlbSgwKVsiaW5uZXJIVE1MIl0pLy8=` \n4. Click on the _OpenLink_ button\n5. Notice the alert box and ability to access the `h2` title from the parent page\n\nIt can also be verified via `https://paylink.meshconnect.com/?linkToken=amF2YXNjcmlwdDphbGVydCgpLy8=`.\n\n### Impact\nThis is technically indistinguishable from a real page at the rendering level and allows access to the parent page DOM, storage, session, and cookies. If the attacker can specify `customIframeId`, they can hijack the source of existing iframes.\n\nIf access to the private key is possible or if transactions are tampered with or initialized, in a wallet context, it can result in a critical impact due to loss of funds scenarios.\n\n### Reporters\n- [Amine `zwxxb` Elsassi](https://github.com/zwxxb) of [Aptos Labs](https://aptoslabs.com/)", "id": "GHSA-vh3f-qppr-j97f", "modified": "2025-09-22T21:58:19Z", "published": "2025-09-22T21:09:27Z", "references": [ { "type": "WEB", "url": "https://github.com/FrontFin/mesh-web-sdk/security/advisories/GHSA-vh3f-qppr-j97f" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59430" }, { "type": "WEB", "url": "https://github.com/FrontFin/mesh-web-sdk/pull/124" }, { "type": "WEB", "url": "https://github.com/FrontFin/mesh-web-sdk/commit/7f22148516d58e21a8b7670dde927d614c0d15c2" }, { "type": "PACKAGE", "url": "https://github.com/FrontFin/mesh-web-sdk" }, { "type": "WEB", "url": "https://github.com/FrontFin/mesh-web-sdk/blob/cf013b85ab95d64c63cbe46d6cb14695474924e7/packages/link/src/Link.ts#L441" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N", "type": "CVSS_V3" } ], "summary": "Mesh Connect JS SDK Vulnerable to Cross Site Scripting via createLink.openLink" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.