CVE-2026-42207

CVE-2026-42207 is a medium-severity open redirect vulnerability in openmage/magento-lts (composer), affecting versions <= 20.17.0. It is fixed in 20.18.0.

Summary

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.

Vulnerable path:

// app/code/core/Mage/ProductAlert/controllers/AddController.php : stockAction()

$backUrl = $this->getRequest()->getParam(Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED);  // raw, no decode
$productId = (int) $this->getRequest()->getParam('product_id');

if (!$backUrl || !$productId) {
    $this->_redirect('/');
    return;
}

$product = Mage::getModel('catalog/product')->load($productId);

if (!$product->getId()) {
    $session->addError($this->__('Not enough parameters.'));
    $this->_redirectUrl($backUrl);   // ← NO _isUrlInternal() check
    return;
}

Secure peer (priceAction()):

if (!$product->getId()) {
    if ($this->_isUrlInternal($backUrl)) {  // ← validation present
        $this->_redirectUrl($backUrl);
    } else {
        $this->_redirect('/');
    }
    return;
}

Steps to Reproduce

Prerequisites

  • OpenMage LTS ≤ 20.16.0 with Product Alerts enabled (default configuration)
  • A valid, logged-in customer session on the target store

Step 1 – Authenticate as a Customer (Attacker controls the crafted link; victim must be logged in)

The 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.

Step 2 – Craft the Malicious URL

The uenc parameter is read raw via getParam() with no base64 decoding in this code path. A plain URL is sufficient and produces the redirect:

GET /productalert/add/stock/?product_id=99999&uenc=https://evil.com/steal-credentials HTTP/1.1
Host: <store-hostname>
Cookie: om_frontend=<authenticated-session>

Key conditions:

  • product_id must reference a non-existent product (triggers the vulnerable branch; any large ID works)
  • uenc is the raw destination URL (no base64 encoding required)

Technical Impact

An 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.

Business-Level Attack Vectors

Scenario Description
Credential phishing Craft a link claiming to show a stock notification. Customer lands on attacker’s login clone and reuses their password.
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.
Affiliate fraud Redirect customers from the legitimate store to a competing retailer after they click a “notify me” link.
Malware distribution Redirect to drive-by-download pages with the store’s reputation acting as social proof.

Propagation

A single malicious link can be embedded in:

  • Customer emails (“Click here for stock notification preferences”)
  • Forum posts, social media, or product reviews on the store
  • SEO-poisoned search results that rank the store’s domain

Impact

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

CVE-2026-42207 has a CVSS score of 6.1 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (20.18.0); upgrading removes the vulnerable code path.

Affected versions

openmage/magento-lts (<= 20.17.0)

Security releases

openmage/magento-lts → 20.18.0 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Apply the same _isUrlInternal() guard used in priceAction() to the stockAction() missing-product

This is an AI-generated report.

An 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.

Frequently Asked Questions

  1. What is CVE-2026-42207? CVE-2026-42207 is a medium-severity open redirect vulnerability in openmage/magento-lts (composer), affecting versions <= 20.17.0. It is fixed in 20.18.0. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. How severe is CVE-2026-42207? CVE-2026-42207 has a CVSS score of 6.1 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of openmage/magento-lts are affected by CVE-2026-42207? openmage/magento-lts (composer) versions <= 20.17.0 is affected.
  4. Is there a fix for CVE-2026-42207? Yes. CVE-2026-42207 is fixed in 20.18.0. Upgrade to this version or later.
  5. Is CVE-2026-42207 exploitable, and should I be worried? Whether CVE-2026-42207 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-42207 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-42207? Upgrade openmage/magento-lts to 20.18.0 or later.

Other vulnerabilities in openmage/magento-lts

Stop the waste.
Protect your environment with Kodem.