CWE-87
AllowedImproper Neutralization of Alternate XSS Syntax
Abstraction: Variant · Status: Draft
The product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax.
101 vulnerabilities reference this CWE, most recent first.
GHSA-X8JV-Q8J2-487C
Vulnerability from github – Published: 2026-05-06 20:57 – Updated: 2026-05-15 23:49A reflected XSS vulnerability was found under admin panel -> System -> Import/Export -> Dataflow - Profiles.
Steps to produce
-
Login to the admin panel
-
Go to the path
System -> Import/Export -> Dataflow - Profiles -
Select profile direction as
Import. -
Click on
Import Customers -
Upload the file.
File Link: customer_20260212_204335.csv
-
Go back to
Run profile. -
Select the uploaded file and Click on
Run in Popup. -
One can see a URL like this
https://demo-admin.openmage.org/index.php/admin/system_convert_gui/run/id/6/key/40dbbb2e93f45f0463c57ff733352f4f/files/import-20260215151125-1_customer_20260212_204335.csv/
-
One can see the filename getting reflection in HTML tags.
-
Inject an HTML tag and observe.
https://demo-admin.openmage.org/index.php/admin/system_convert_gui/run/id/6/key/40dbbb2e93f45f0463c57ff733352f4f/files/"><h3>hacked</h3>/
-
One can see the tag is getting executed.
-
Proceed for XSS.
https://demo-admin.openmage.org/index.php/admin/system_convert_gui/run/id/6/key/40dbbb2e93f45f0463c57ff733352f4f/files/%3CScRiPt%20%3Eprompt(document.cookie)%3C%2FScRiPt%3E
- There is an XSS popup.
Impact
Cookie stealing, JS deface, many more
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 20.17.0"
},
"package": {
"ecosystem": "Packagist",
"name": "openmage/magento-lts"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "20.18.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-42458"
],
"database_specific": {
"cwe_ids": [
"CWE-87"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-06T20:57:37Z",
"nvd_published_at": "2026-05-15T17:16:46Z",
"severity": "MODERATE"
},
"details": "A reflected XSS vulnerability was found under admin panel -\u003e System -\u003e Import/Export -\u003e Dataflow - Profiles.\n\n## Steps to produce\n\n+ Login to the admin panel \n\n+ Go to the path `System -\u003e Import/Export -\u003e Dataflow - Profiles`\n\n+ Select profile direction as `Import`.\n\n+ Click on `Import Customers` \n\n+ Upload the file.\n\nFile Link: [customer_20260212_204335.csv](https://github.com/user-attachments/files/25629638/customer_20260212_204335.csv)\n\n+ Go back to `Run profile`.\n\n+ Select the uploaded file and Click on `Run in Popup`.\n\n+ One can see a URL like this \n\n```\nhttps://demo-admin.openmage.org/index.php/admin/system_convert_gui/run/id/6/key/40dbbb2e93f45f0463c57ff733352f4f/files/import-20260215151125-1_customer_20260212_204335.csv/\n```\n\n\n+ One can see the filename getting reflection in HTML tags.\n\n+ Inject an HTML tag and observe.\n\n```\nhttps://demo-admin.openmage.org/index.php/admin/system_convert_gui/run/id/6/key/40dbbb2e93f45f0463c57ff733352f4f/files/\"\u003e\u003ch3\u003ehacked\u003c/h3\u003e/\n``` \n\n\u003cimg width=\"1796\" height=\"302\" alt=\"image (3)\" src=\"https://github.com/user-attachments/assets/502330b0-fa73-4b90-a81f-6216a98e474a\" /\u003e\n\n+ One can see the tag is getting executed.\n\n+ Proceed for XSS.\n\n```\nhttps://demo-admin.openmage.org/index.php/admin/system_convert_gui/run/id/6/key/40dbbb2e93f45f0463c57ff733352f4f/files/%3CScRiPt%20%3Eprompt(document.cookie)%3C%2FScRiPt%3E\n```\n\n\u003cimg width=\"1670\" height=\"562\" alt=\"image (4)\" src=\"https://github.com/user-attachments/assets/98a75081-fa8c-4483-9078-0ab5e7e14e4d\" /\u003e\n\n\n+ There is an XSS popup.\n\n## Impact\n\nCookie stealing, JS deface, many more",
"id": "GHSA-x8jv-q8j2-487c",
"modified": "2026-05-15T23:49:07Z",
"published": "2026-05-06T20:57:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/OpenMage/magento-lts/security/advisories/GHSA-x8jv-q8j2-487c"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42458"
},
{
"type": "PACKAGE",
"url": "https://github.com/OpenMage/magento-lts"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Magento LTS: Reflected XSS - Import -\u003e Data Flow (profiles) "
}
Mitigation
Resolve all input to absolute or canonical representations before processing.
Mitigation
Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including tag attributes, hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often encounter data from the request that is reflected by the application server or the application that the development team did not anticipate. Also, a field that is not currently reflected may be used by a future developer. Therefore, validating ALL parts of the HTTP request is recommended.
Mitigation MIT-30.1
Strategy: Output Encoding
- Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
- The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.
Mitigation MIT-43
With Struts, write all data from form beans with the bean's filter attribute set to true.
Mitigation MIT-31
Strategy: Attack Surface Reduction
To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.
CAPEC-199: XSS Using Alternate Syntax
An adversary uses alternate forms of keywords or commands that result in the same action as the primary form but which may not be caught by filters. For example, many keywords are processed in a case insensitive manner. If the site's web filtering algorithm does not convert all tags into a consistent case before the comparison with forbidden keywords it is possible to bypass filters (e.g., incomplete black lists) by using an alternate case structure. For example, the "script" tag using the alternate forms of "Script" or "ScRiPt" may bypass filters where "script" is the only form tested. Other variants using different syntax representations are also possible as well as using pollution meta-characters or entities that are eventually ignored by the rendering engine. The attack can result in the execution of otherwise prohibited functionality.