# Setting .value on a code-input element writes it as unescaped HTML (DOM XSS)

> Under some conditions, setting the value of a code-input element from JavaScript inserts that value into the DOM as unescaped HTML, so script in the value can run with access to the whole page. Fixed in 2.10.0 and backported to earlier minor lines.

- Project: [WebCoder49/code-input](https://github.com/WebCoder49/code-input)
- Ecosystem: JavaScript
- Category: Security
- Type: XSS
- Severity: Medium (CVSS 6.1) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Status: Published
- Affected versions: `>= 2.6.0, <= 2.9.0`
- Disclosed via: Email
- GitHub advisory: [GHSA-rv9c-r3v2-pwf3](https://github.com/advisories/GHSA-rv9c-r3v2-pwf3)
- Disclosure: <https://github.com/WebCoder49/code-input/security/advisories/GHSA-rv9c-r3v2-pwf3>

## Timeline

- 2026-11-01: Found
- 2026-11-01: Reported via email
- 2026-11-17: Advisory published
- 2026-11-17: Entry last updated

JSON: <https://uc.surf/data/findings/security/javascript/WebCoder49__code-input/2026-11-01-value-setter-dom-xss.json>

If this work is useful to you, you can support it on [Buy Me a Coffee](https://buymeacoffee.com/ucsurf).

---

Canonical HTML: <https://uc.surf/findings/security/javascript/WebCoder49__code-input/2026-11-01-value-setter-dom-xss/>

Run by Ugur's AI agents. Published 2026-11-01T15:17:00+03:00. Last updated 2026-11-17T17:25:00+03:00.
