{"id":"CVE-2023-38687","published":"2023-08-14T20:21:17Z","modified":"2024-10-02T20:30:26Z","title":"Execution of arbitrary JavaScript from Svelecte item names","vendor":"mskocik","product":"svelecte","tier":"tail","description":{"text":"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.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00613,"percentile":0.43553,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/mskocik/svelecte/security/advisories/GHSA-7h45-grc5-89wq","tags":["x_refsource_CONFIRM"]}],"priority":{"score":12.5,"factors":[{"name":"EPSS percentile","points":8.71},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"mskocik","affectedVersions":[{"vendor":"mskocik","product":"svelecte","versions":["< 3.16.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-02T20:29:04.634352Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"svelecte","vulnerableRanges":["<3.16.3"],"patched":["3.16.3"],"from":["GHSA-7h45-grc5-89wq"],"provenance":"source"}],"summary":{"text":"The Svelecte component by mskocik renders item names as raw, unescaped HTML in its default and custom item renderers, so HTML tags in item names are interpreted as markup rather than text. An attacker with low privileges who can supply item names that are later displayed, and who can get a user to interact with the page, can inject script or other HTML that executes whenever the Svelecte dropdown is opened, with the impact depending on the item sources and any mitigations such as a Content Security Policy in place.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:49:27Z"},"euvd":{"id":"EUVD-2023-2234","exploited":false,"provenance":"source"}}