CVE-2026-30691 @cyntler/react-doc-viewer's TXTRenderer fails to sanitize file content and explicitly casts raw data as a ReactNode

Medium 6.1 Published Updated

Remote attackers can execute arbitrary JavaScript via crafted text files due to unsanitized content in the React document viewer library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-30691?

CVE-2026-30691 is a medium-severity cross-site scripting vulnerability in n/a, published on 20 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Cross-Site Scripting (XSS) vulnerability in @cyntler/react-doc-viewer v1.17.1 allows remote attackers to execute arbitrary JavaScript via a crafted .txt file. The TXTRenderer component fails to sanitize file content and explicitly casts raw data as a ReactNode

Weakness: CWE-79

Which versions are affected by CVE-2026-30691?

2 open source packages ship an affected version, including @cyntler/react-doc-viewer.

PackageAffectedFixed in
@cyntler/react-doc-viewer npmAll versions to 1.17.1None
@cyntler/react-doc-viewer npmAll versions to 1.17.1None

How do I fix CVE-2026-30691?

No fix has been published for CVE-2026-30691 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-30691 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-30691 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-fvhg-p4hf-79x3.

Is CVE-2026-30691 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free