CVE-2025-62415: Bagisto/bagisto Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-67px-r26w-598x
CVSS 6.9
CWE-87 CWE-80 CWE-79
Published
Advisory Summary

CVE-2025-62415 is a MODERATE (CVSS 6.9) cross-site scripting vulnerability (CWE-87: Improper Neutralization of Alternate XSS Syntax) affecting Bagisto/bagisto libraries in the Packagist ecosystem. The issue involves bagisto has cross site scripting (xss) issue in tinymce image upload (html). Remediation is available by upgrading affected packages to version 2.3.8.

CVE-2025-62415 at a Glance

CVE Identifier CVE-2025-62415
GHSA Identifier GHSA-67px-r26w-598x
Severity MODERATE
CVSS v3.1 Base Score 6.9
CWE Classification CWE-87: Improper Neutralization of Alternate XSS Syntax
Affected Product Bagisto/bagisto
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-62415

To remediate this vulnerability, upgrade all affected Bagisto/bagisto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bagisto/bagisto fixed: 2.3.8
Upgrade bagisto/bagisto to 2.3.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for bagisto/bagisto

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-62415, inspect your project dependencies for Bagisto/bagisto:

inspect dependencies for bagisto/bagisto

Analyze the terminal output to locate any version of Bagisto/bagisto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-87: Improper Neutralization of Alternate XSS Syntax, where the product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax. In Bagisto/bagisto, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary In Bagisto v2.3.7, the TinyMCE image upload functionality allows an attacker with sufficient privileges (e.g. admin) to upload a crafted HTML file containing embedded JavaScript. When viewed, the malicious code executes in the context of the admin/user’s browser. ### Details The application blocks the uploading of HTML files; however, if the backend detected that the content of the .png file is HTML or JavaScript, the file extension will be automatically converted from .png to .html. When the HTML is viewed, it will execute the JavaScript code. ### PoC Created a html file, renamed the extension to .png, and uploaded the file. It was converted to HTML file in the backend. When opened in another tab, the JavaScript code will execute. <img width="1605" height="702" alt="image" src="https://github.com/user-attachments/assets/bd9406aa-2380-464f-ac21-32d483639969" /> <img width="1358" height="314" alt="image" src="https://github.com/user-attachments/assets/e5a64a5a-39fb-4fdb-ada9-14c4b9554803" /> ### Impact A aalicious script is stored in HTML file and executed when the content is viewed. An attacker (with upload privilege) can target other admin users or editors who view the content, enabling session hijacking, unauthorized actions, or privilege escalation.

CVE-2025-62415 Affected Bagisto/bagisto Versions

1 component(s)
Fixed Versions:
2.3.8
Product / Package Ecosystem Affected Versions Fixed Version
bagisto/bagisto
Packagist
< 2.3.8
2.3.8

References

Frequently Asked Questions

What is CVE-2025-62415?
CVE-2025-62415 is a security vulnerability in Bagisto/bagisto involving bagisto has Cross Site Scripting (XSS) issue in TinyMCE Image Upload (HTML) under CWE-87: Improper Neutralization of Alternate XSS Syntax.
Which Bagisto/bagisto versions are affected?
Affected versions include releases prior to 2.3.8 across affected packages: bagisto/bagisto.
What version fixes CVE-2025-62415?
Upgrading to 2.3.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bagisto/bagisto affected?
Yes, bagisto/bagisto is affected in releases prior to 2.3.8. Upgrade your dependency to 2.3.8 or later.
What is the CVSS score of CVE-2025-62415?
CVE-2025-62415 has a CVSS v3.1 base score of 6.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2025-62415?
CVE-2025-62415 is classified under CWE-87: Improper Neutralization of Alternate XSS Syntax (The product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax.).
How can I check Packagist dependencies for CVE-2025-62415?
Run the dependency tree command: 'inspect dependencies for bagisto/bagisto'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-67px-r26w-598x",
  "modified" : "2025-10-16T21:54:25Z",
  "published" : "2025-10-16T18:12:10Z",
  "aliases" : [ "CVE-2025-62415" ],
  "summary" : "bagisto has Cross Site Scripting (XSS) issue in TinyMCE Image Upload (HTML)",
  "details" : "### Summary\nIn Bagisto v2.3.7, the TinyMCE image upload functionality allows an attacker with sufficient privileges (e.g. admin) to upload a crafted HTML file containing embedded JavaScript. When viewed, the malicious code executes in the context of the admin/user’s browser.\n\n### Details\nThe application blocks the uploading of HTML files; however, if the backend detected that the content of the .png file is HTML or JavaScript, the file extension will be automatically converted from .png to .html. When the HTML is viewed, it will execute the JavaScript code.\n\n### PoC\nCreated a html file, renamed the extension to .png, and uploaded the file. It was converted to HTML file in the backend. When opened in another tab, the JavaScript code will execute.\n<img width=\"1605\" height=\"702\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bd9406aa-2380-464f-ac21-32d483639969\" />\n<img width=\"1358\" height=\"314\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e5a64a5a-39fb-4fdb-ada9-14c4b9554803\" />\n\n### Impact\nA aalicious script is stored in HTML file and executed when the content is viewed. An attacker (with upload privilege) can target other admin users or editors who view the content, enabling session hijacking, unauthorized actions, or privilege escalation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "bagisto/bagisto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.3.7"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bagisto/bagisto/security/advisories/GHSA-67px-r26w-598x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62415"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bagisto/bagisto/commit/7b6b1dd639a14e7053bb82ef2f971c1f533fdfab"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bagisto/bagisto"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-80", "CWE-87" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-16T18:12:10Z",
    "nvd_published_at" : "2025-10-16T19:15:34Z"
  }
}