# GHSA-6F8V-MP93-HQ5H: Alert documentation links allow JavaScript URL execution from uploaded report data | pkg:npm/%40rsdoctor/client@2.0.0-beta.0

- Database: GitHub
- Severity: low (stated by ghsa, no CVSS score)
- Published: 2026-10-09
- Modified: 2026-10-09

## Affected versions

- @rsdoctor/client (npm): fixed in 1.6.5

## Description

## Summary

`@rsdoctor/client` before version `1.6.5` does not validate the URL scheme of documentation links supplied in report data. A crafted report can use a `javascript:` URL to execute script when a viewer clicks an alert's “more” link.

## Impact

An attacker who can provide a report file—for example through a shared CI artifact, attachment, or build output—can set an alert's `link` field to a malicious `javascript:` URL.

If a user imports the untrusted report into the Rsdoctor report viewer and clicks the alert's “more” link, the client passes the URL to `window.open()` without validating its scheme. The script runs in the report viewer's origin and can access the opener's same-origin DOM and browser storage.

This requires user interaction: the victim must open the attacker-controlled report and click the documentation link.

## Affected Versions

`@rsdoctor/client` versions before `1.6.5` are affected.

## Patches

This issue is fixed in `@rsdoctor/client` version `1.6.5`.

The fix accepts only HTTP(S) external URLs and opens them using `_blank` with `noopener,noreferrer`.

## Reproduction

1. Open the Rsdoctor report uploader.
2. Import a report containing an alert with a `javascript:` value in its `link` field, for example:

   ```json
   {
     "clientRoutes": ["Bundle.BundleSize"],
     "data": {
       "root": "/tmp/app",
       "errors": [
         {
           "id": "poc",
           "code": "E1003",
           "category": "bundle",
           "title": "Proof of concept",
           "description": "Click more",
           "level": "warn",
           "type": "link",
           "link": "javascript:alert(document.domain)"
         }
       ]
     }
   }
3. Navigate to the rendered alert and click its “more” link.
4. In affected versions, the JavaScript URL executes. In version 1.6.5 and later, the URL is rejected and the script does not execute.

## Workarounds
Upgrade to version 1.6.5 or later.
If upgrading is not immediately possible, do not import reports from untrusted sources or click documentation links in untrusted reports

## References

- https://github.com/web-infra-dev/rsdoctor/security/advisories/GHSA-6f8v-mp93-hq5h

Page: https://cve.now/GHSA-6F8V-MP93-HQ5H

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
