CVE-2026-42207: Openmage/magento lts Magento LTS Vulnerable To Open Vulnerability
MODERATECVE-2026-42207 is a MODERATE (CVSS 6.1) magento lts vulnerable to open vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Openmage/magento lts libraries in the Packagist ecosystem. The issue involves magento lts vulnerable to open redirect via unvalidated `uenc` parameter in `stockaction()`. Remediation is available by upgrading affected packages to version 20.18.0.
CVE-2026-42207 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-42207
To remediate this vulnerability, upgrade all affected Openmage/magento lts dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade openmage/magento-lts to 20.18.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for openmage/magento-lts
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-42207, inspect your project dependencies for Openmage/magento lts:
inspect dependencies for openmage/magento-lts
Analyze the terminal output to locate any version of Openmage/magento lts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 20.18.0), 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Openmage/magento lts, 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
CVE-2026-42207 Affected Openmage/magento lts Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openmage/magento-lts
|
Packagist |
< 20.18.0
|
20.18.0
|
References
Frequently Asked Questions
What is CVE-2026-42207?
Which Openmage/magento lts versions are affected?
What version fixes CVE-2026-42207?
Is openmage/magento-lts affected?
What is the CVSS score of CVE-2026-42207?
What CWE is associated with CVE-2026-42207?
How can I check Packagist dependencies for CVE-2026-42207?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qpgq-5g92-j5q8",
"modified" : "2026-05-15T23:48:48Z",
"published" : "2026-05-05T20:11:21Z",
"aliases" : [ "CVE-2026-42207" ],
"summary" : "Magento LTS Vulnerable to Open Redirect via Unvalidated `uenc` Parameter in `stockAction()`",
"details" : "## Summary\n`Mage_ProductAlert_AddController::stockAction()` reads the uenc query parameter and passes it directly to `$this->_redirectUrl($backUrl)` without calling `$this->_isUrlInternal()` When the supplied `product_id` does not match any catalog product, the server issues an unvalidated HTTP 302 redirect to whatever URL was provided as `uenc`.\n\n## Vulnerable path:\n\n```php\n// app/code/core/Mage/ProductAlert/controllers/AddController.php : stockAction()\n\n$backUrl = $this->getRequest()->getParam(Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED); // raw, no decode\n$productId = (int) $this->getRequest()->getParam('product_id');\n\nif (!$backUrl || !$productId) {\n $this->_redirect('/');\n return;\n}\n\n$product = Mage::getModel('catalog/product')->load($productId);\n\nif (!$product->getId()) {\n $session->addError($this->__('Not enough parameters.'));\n $this->_redirectUrl($backUrl); // ← NO _isUrlInternal() check\n return;\n}\n```\n\n### Secure peer (priceAction()):\n\n```php\nif (!$product->getId()) {\n if ($this->_isUrlInternal($backUrl)) { // ← validation present\n $this->_redirectUrl($backUrl);\n } else {\n $this->_redirect('/');\n }\n return;\n}\n```\n\n## Steps to Reproduce\n\n### Prerequisites\n- OpenMage LTS ≤ 20.16.0 with Product Alerts enabled (default configuration)\n- A valid, logged-in customer session on the target store\n\n#### Step 1 – Authenticate as a Customer (Attacker controls the crafted link; victim must be logged in)\n\nThe `preDispatch()` hook calls `Mage::getSingleton('customer/session')->authenticate($this)`. If the request comes from an unauthenticated user, they are redirected to the login page first. The open redirect only fires after the customer is authenticated. This is the realistic attack scenario: the attacker sends a crafted link to a customer who is already logged in.\n\n<img width=\"1548\" height=\"638\" alt=\"image\" src=\"https://github.com/user-attachments/assets/64c18279-ec0a-4110-b8f4-d952870e348c\" />\n\n#### Step 2 – Craft the Malicious URL\nThe `uenc` parameter is read raw via `getParam()` with no base64 decoding in this code path. A plain URL is sufficient and produces the redirect:\n\n```\nGET /productalert/add/stock/?product_id=99999&uenc=https://evil.com/steal-credentials HTTP/1.1\nHost: <store-hostname>\nCookie: om_frontend=<authenticated-session>\n```\n\nKey conditions:\n- `product_id` must reference a non-existent product (triggers the vulnerable branch; any large ID works)\n- `uenc` is the raw destination URL (no base64 encoding required)\n\n<img width=\"1554\" height=\"852\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d8530247-2d2f-4747-bf16-ece71a507b50\" />\n\n\n## Impact\n\n### Technical Impact\nAn attacker who controls the `uenc` parameter value can redirect any logged-in shopper to an arbitrary external URL. Because the redirect originates from the legitimate store domain, the victim’s browser shows the trusted store URL in the address bar momentarily before being sent to the attacker site. The HTTP 302 response exits the store’s origin before the browser shows anything to the user.\n\n### Business-Level Attack Vectors\n| Scenario | Description |\n|------------------------|-----------------------------------------------------------------------------|\n| Credential phishing | Craft a link claiming to show a stock notification. Customer lands on attacker’s login clone and reuses their password. |\n| OAuth / SSO token theft| If the store uses a social login or “Login with Google” flow, the attacker can inject their redirect_uri via the open redirect, stealing OAuth tokens. |\n| Affiliate fraud | Redirect customers from the legitimate store to a competing retailer after they click a “notify me” link. |\n| Malware distribution | Redirect to drive-by-download pages with the store’s reputation acting as social proof. |\n\n### Propagation\nA single malicious link can be embedded in:\n\n- Customer emails (“Click here for stock notification preferences”)\n- Forum posts, social media, or product reviews on the store\n- SEO-poisoned search results that rank the store’s domain\n\n## Recommended Fix\nApply the same `_isUrlInternal()` guard used in `priceAction()` to the `stockAction()` missing-product\n\n\nThis is an AI-generated report.\n\nAn attempt was made to test the same PoC against the online demo https://demo.openmage.org/ but it couldn't be reproduced. It was only reproduced against the local setup env against the latest version.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "openmage/magento-lts"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "20.18.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 20.17.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/OpenMage/magento-lts/security/advisories/GHSA-qpgq-5g92-j5q8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42207"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/OpenMage/magento-lts"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-05T20:11:21Z",
"nvd_published_at" : "2026-05-15T17:16:46Z"
}
}