ghsa-fg89-g389-p346
Vulnerability from github
Summary
In Bagisto v2.3.7, the TinyMCE image upload functionality allows an attacker with sufficient privileges (e.g. admin) to upload a crafted SVG file containing embedded JavaScript. When viewed, the malicious code executes in the context of the admin/user’s browser.
Details
The underlying problem is that SVG is XML/markup, so when it is uploaded and then directly rendered or embedded, script or event handlers within are allowed to run unless sanitized. In Bagisto, the integration of TinyMCE’s image upload (or media manager) may accept SVG files without sanitizing or rejecting unsafe content. When the SVG is later included (inline or via object/embed) in content displayed in admin or UI, the browser may execute the script portion of the SVG. The application might not validate the file content (i.e. inspect the SVG XML) or strip , onload, onclick, foreignObject, xlink:href injection, objects/embed tags, etc.
PoC
Navigate to any forms with TinyMCE editor. Attempt to upload a SVG file with embedded JavaScript.
JavaScript was triggered.
Impact
Malicious script is stored in SVG 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.
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 2.3.7" }, "package": { "ecosystem": "Packagist", "name": "bagisto/bagisto" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.3.8" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-62418" ], "database_specific": { "cwe_ids": [ "CWE-79", "CWE-80", "CWE-87" ], "github_reviewed": true, "github_reviewed_at": "2025-10-16T20:41:03Z", "nvd_published_at": "2025-10-16T19:15:34Z", "severity": "MODERATE" }, "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 SVG file containing embedded JavaScript. When viewed, the malicious code executes in the context of the admin/user\u2019s browser.\n\n### Details\nThe underlying problem is that SVG is XML/markup, so when it is uploaded and then directly rendered or embedded, script or event handlers within are allowed to run unless sanitized. In Bagisto, the integration of TinyMCE\u2019s image upload (or media manager) may accept SVG files without sanitizing or rejecting unsafe content. When the SVG is later included (inline or via object/embed) in content displayed in admin or UI, the browser may execute the script portion of the SVG. The application might not validate the file content (i.e. inspect the SVG XML) or strip \u003cscript\u003e, onload, onclick, foreignObject, xlink:href injection, objects/embed tags, etc.\n\n### PoC\nNavigate to any forms with TinyMCE editor. Attempt to upload a SVG file with embedded JavaScript.\n\u003cimg width=\"1580\" height=\"795\" alt=\"image\" src=\"https://github.com/user-attachments/assets/17df21a4-bfcd-4c51-a963-68f68241fd2e\" /\u003e\nJavaScript was triggered.\n\u003cimg width=\"1402\" height=\"409\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d0e326c3-6f23-449d-8f90-1e1032818d80\" /\u003e\n\n### Impact\nMalicious script is stored in SVG 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.", "id": "GHSA-fg89-g389-p346", "modified": "2025-10-16T21:54:49Z", "published": "2025-10-16T20:41:03Z", "references": [ { "type": "WEB", "url": "https://github.com/bagisto/bagisto/security/advisories/GHSA-fg89-g389-p346" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-62418" }, { "type": "WEB", "url": "https://github.com/bagisto/bagisto/commit/7b6b1dd639a14e7053bb82ef2f971c1f533fdfab" }, { "type": "PACKAGE", "url": "https://github.com/bagisto/bagisto" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N", "type": "CVSS_V3" } ], "summary": "bagisto has a Cross Site Scripting (XSS) vulnerability in TinyMCE Image Upload (SVG)" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.