CVE-2025-61457

6.1 MEDIUM

📋 TL;DR

CVE-2025-61457 is a Cross-Site Scripting (XSS) vulnerability in code16 Sharp v9.6.6's SharpFormUploadField.php component. This allows attackers to inject malicious scripts into web pages viewed by users, potentially stealing session cookies or performing actions on behalf of victims. Organizations using code16 Sharp v9.6.6 or earlier versions with the vulnerable upload field are affected.

💻 Affected Systems

Products:
  • code16 Sharp
Versions: v9.6.6 and earlier
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using the SharpFormUploadField.php component. The vulnerability is in the file upload handling logic.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, gain full administrative access to the application, and potentially compromise the entire system or pivot to internal networks.

🟠

Likely Case

Attackers steal user session cookies or credentials, perform unauthorized actions on behalf of authenticated users, or deface web pages.

🟢

If Mitigated

With proper input validation and output encoding, the impact is limited to minor data leakage or temporary disruption.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the attacker to craft malicious upload requests that bypass input validation. The vulnerability details are publicly documented but no proof-of-concept code is available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v9.7.0

Vendor Advisory: https://github.com/code16/sharp/releases/tag/v9.7.0

Restart Required: No

Instructions:

1. Backup your current installation. 2. Update code16 Sharp to version 9.7.0 or later using composer: 'composer require code16/sharp:^9.7.0'. 3. Verify the update completed successfully. 4. Test the upload functionality to ensure it works correctly.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement server-side validation and sanitization of all user inputs in the upload field to prevent XSS payloads.

Content Security Policy (CSP)

all

Implement a strict Content Security Policy header to mitigate the impact of XSS attacks by restricting script execution.

🧯 If You Can't Patch

  • Disable or restrict access to the vulnerable upload field component if not essential.
  • Implement a Web Application Firewall (WAF) with XSS protection rules to block malicious requests.

🔍 How to Verify

Check if Vulnerable:

Check the version of code16 Sharp installed. If it is v9.6.6 or earlier, the system is vulnerable. Review the SharpFormUploadField.php file for lack of proper input sanitization.

Check Version:

composer show code16/sharp | grep version

Verify Fix Applied:

After updating to v9.7.0 or later, test the upload functionality with various inputs to ensure no XSS payloads execute. Verify the version is updated.

📡 Detection & Monitoring

Log Indicators:

  • Unusual upload requests with script tags or JavaScript code in filenames or parameters
  • Multiple failed upload attempts with suspicious payloads

Network Indicators:

  • HTTP requests to the upload endpoint containing XSS payloads in parameters
  • Unexpected outbound connections from the server after uploads

SIEM Query:

source="web_logs" AND (url_path="/upload" OR url_path LIKE "%/upload%") AND (request_body CONTAINS "<script>" OR request_body CONTAINS "javascript:")

🔗 References

📤 Share & Export