The vulnerability, a stored Cross-Site Scripting (XSS) issue, exists in the Statamic CMS because it failed to properly sanitize SVG files during re-upload. An attacker with permissions to upload assets could replace a benign SVG file with a malicious one containing JavaScript. When this SVG is viewed, the script would execute in the user's browser.
The analysis of the security patches for versions 5.73.14 and 6.7.0 reveals that the core of the vulnerability is in the reupload method of the Statamic\Assets\Asset class. The patches introduce a new code block that explicitly checks if the re-uploaded file is an SVG and, if so, sanitizes its content using DOMSanitizer before saving it. The absence of this sanitization step in the vulnerable versions is what allowed the XSS attack. Therefore, the Statamic\Assets\Asset::reupload function is the key vulnerable function that would appear in a runtime profile during exploitation.