CVE-2023-26123 Cross-site scripting in raysan5/raylib
An XSS vulnerability in raylib's SetClipboardText API allows arbitrary JavaScript execution when compiled for the web platform.
- 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
- Available
What is CVE-2023-26123?
CVE-2023-26123 is a medium-severity cross-site scripting vulnerability in raysan5/raylib, published on 14 Apr 2023. 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
Versions of the package raysan5/raylib before 4.5.0 are vulnerable to Cross-site Scripting (XSS) such that the SetClipboardText API does not properly escape the ' character, allowing attacker-controlled input to break out of the string and execute arbitrary JavaScript via emscripten_run_script function. **Note:** This vulnerability is present only when compiling raylib for PLATFORM_WEB. All the other Desktop/Mobile/Embedded platforms are not affected.
Weakness: CWE-79
Which versions are affected by CVE-2023-26123?
It affects 1 product.
Products include Raylib Raylib.
How do I fix CVE-2023-26123?
Upgrade to a fixed version.
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-2023-26123 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-26123 exists.
Other vulnerabilities in raysan5/raylib
Sources
Also known as GHSA-62mx-2499-jrm4, JLSEC-2026-529.