# CVE-2023-38687: Execution of arbitrary JavaScript from Svelecte item names

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-08-14T20:21:17.694Z
- Modified: 2026-06-17T06:10:57.280Z
- Also known as: GHSA-7h45-grc5-89wq
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Svelecte is a flexible autocomplete/select component written in Svelte. Svelecte item names are rendered as raw HTML with no escaping. This allows the injection of arbitrary HTML into the Svelecte dropdown. This can be exploited to execute arbitrary JavaScript whenever a Svelecte dropdown is opened. Item names given to Svelecte appear to be directly rendered as HTML by the default item renderer. This means that any HTML tags in the name are rendered as HTML elements not as text. Note that the custom item renderer shown in https://mskocik.github.io/svelecte/#item-rendering is also vulnerable to the same exploit. Any site that uses Svelecte with dynamically created items either from an external source or from user-created content could be vulnerable to an XSS attack (execution of untrusted JavaScript), clickjacking or any other attack that can be performed with arbitrary HTML injection. The actual impact of this vulnerability for a specific application depends on how trustworthy the sources that provide Svelecte items are and the steps that the application has taken to mitigate XSS attacks. XSS attacks using this vulnerability are mostly mitigated by a Content Security Policy that blocks inline JavaScript. This issue has been addressed in version 3.16.3. Users are advised to upgrade. There are no known workarounds for this vulnerability.

(As written by CVE List.)

## Affected

- mskocik svelecte: < 3.16.3; before 3.16.3
- svelecte (npm): before 3.16.3

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/mskocik/svelecte/security/advisories/GHSA-7h45-grc5-89wq> (exploit, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-38687> (advisory)
- <https://github.com/mskocik/svelecte> (package)

## Sources

- CVE List: [CVE-2023-38687](https://www.cve.org/CVERecord?id=CVE-2023-38687), CVE Terms of Use, modified 2024-10-02
- GitHub Advisory Database: [GHSA-7h45-grc5-89wq](https://github.com/advisories/GHSA-7h45-grc5-89wq), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2023-38687](https://nvd.nist.gov/vuln/detail/CVE-2023-38687), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-38687 · Whole record: https://cve.day/CVE-2023-38687.json · Rebuilt by cve.day 2026-11-25T22:58:27.118Z
