Headline
CVE-2023-27472: Sanitise tree view text · atampy25/quickentity-editor-next@5303b45
quickentity-editor-next is an open source, system local, video game asset editor. In affected versions HTML tags in entity names are not sanitised (XSS vulnerability). Allows arbitrary code execution within the browser sandbox, among other things, simply from loading a file containing a script tag in any entity name. This issue has been patched in version 1.28.1 of the application. Users are advised to upgrade. There are no known workarounds for this vulnerability.
@@ -4,7 +4,7 @@
import “./treeview.css”
import type { Entity, FullRef, Ref, RefWithConstantValue, SubEntity } from “$lib/quickentity-types”
import { changeReferenceToLocalEntity, genRandHex, getReferencedEntities, getReferencedExternalEntities, getReferencedLocalEntity, normaliseToHash, traverseEntityTree } from “$lib/utils”
import { changeReferenceToLocalEntity, genRandHex, getReferencedEntities, getReferencedExternalEntities, getReferencedLocalEntity, normaliseToHash, sanitise, traverseEntityTree } from “$lib/utils”
import { createEventDispatcher, onMount } from “svelte”
import { v4 } from “uuid”
@@ -96,7 +96,8 @@
dots: true,
icons: true
},
check_callback: true
check_callback: true,
force_text: true
},
search: {
fuzzy: true,
@@ -751,7 +752,7 @@
: icons.find((a) => entityData.factory.includes(a[0]))
? icons.find((a) => entityData.factory.includes(a[0]))![1]
: "far fa-file",
text: `${entityData.name} (ref ${entityID})`,
text: `${sanitise(entityData.name)} (ref ${entityID})`,
folder: entityData.factory == "[modules:/zentity.class].pc_entitytype" && reverseReferences[entityID].some((a) => a.type == “parent”) // for sorting and stuff
})
}
@@ -762,7 +763,7 @@
id: "comment-" + index,
parent: getReferencedLocalEntity(entry.parent) || "#",
icon: "far fa-sticky-note",
text: entry.name + " (comment)",
text: sanitise(entry.name) + " (comment)",
folder: false // for sorting and stuff
})