CVE-2025-62379: Reflex Reflex-dev/reflex Has An Open Redirect Vulnerability

LOW
Advisory Identifier: GHSA-rfh5-c9h5-q8jm
CVSS 3.1
CWE-601
Published
Advisory Summary

CVE-2025-62379 is a LOW (CVSS 3.1) reflex-dev/reflex has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Reflex libraries in the PyPI ecosystem. The issue involves reflex-dev/reflex has an open redirect vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-62379 at a Glance

CVE Identifier CVE-2025-62379
GHSA Identifier GHSA-rfh5-c9h5-q8jm
Severity LOW
CVSS v3.1 Base Score 3.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Reflex
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.1

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

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

How to Fix CVE-2025-62379

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

reflex fixed: Latest secure release
pip install reflex>=Latest secure release
Verify Direct and Transitive Dependencies

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

pip show reflex

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-62379, inspect your installed packages using pip:

pip show reflex

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

Note: The pip show reflex command checks currently installed packages in your active Python environment.

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 Reflex, 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

### Mitigation Make sure `GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN` is not set in a production environment. So the following is correct: ``` assert os.getenv("GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN") is None ``` ### **Vulnerability Description** --- **Vulnerability Overview** - When the GET /auth-codespace page loads in a GitHub Codespaces environment, it automatically assigns the redirect_to query parameter value directly to client-side links without any validation and triggers automatic clicks. This allows attackers to redirect users to arbitrary external URLs. - The route is only registered when a Codespaces environment is detected, and the detection is controlled by environment variables. This means that the same behavior can be activated in production if the corresponding environment variable is set. **Vulnerable Code Analysis** https://github.com/reflex-dev/reflex/blob/51f9f2c2f52cac4d66c07683a12bc0237311b6be/reflex/utils/codespaces.py#L18-L46 - This code assigns the redirect_to query parameter directly to a.href without any validation and immediately triggers a click (automatic navigation), allowing users to be sent to arbitrary external domains, resulting in an open redirect vulnerability. - The execution condition is simply based on the presence of a sessionStorage flag, meaning it triggers immediately on first visits or in incognito/private browsing windows, with no server-side origin/scheme whitelist or internal path enforcement defenses in place. ### PoC --- **PoC Description** <img width="623" height="497" alt="image" src="https://github.com/user-attachments/assets/55ef4828-09fa-451b-a7cc-8fcaad6a2a21" /> - Used the production configuration from docker-example (docker-example/production-compose). - Added a Codespaces detection environment variable to the app container in compose.yaml to forcibly expose the route. - GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN: dummy - The reverse proxy (Caddy) needs to be configured to forward /auth-codespace to the backend (required depending on the environment). **curl Example** ``` https://localhost/auth-codespace?redirect_to=http://google.com ``` **PoC MP4** https://file.notion.so/f/f/d105d145-04bc-45c5-b46c-ed880895e9de/a86c3e3b-f67f-45d1-8fa2-4aa0ba7d0068/poc.mp4?table=block&id=26955717-5d2e-805a-b53c-e25ee03f1d4b&spaceId=d105d145-04bc-45c5-b46c-ed880895e9de&expirationTimestamp=1760508000000&signature=ZPp8PVldfGOh0gB5tVElRV6GN789R-EG0oxZgkFjjLU&downloadName=poc.mp4 <img width="1917" height="949" alt="image" src="https://github.com/user-attachments/assets/e565dc4e-a59b-44d4-a92a-ebf128489e88" /> <img width="1913" height="977" alt="image" src="https://github.com/user-attachments/assets/496fa585-76ea-4d2d-80f8-0ab79f51229e" /> ### Impact --- **Phishing/Social Engineering Attacks** Users can be exploited by immediately redirecting from a trusted domain to external malicious sites, taking advantage of user trust. This enables login page spoofing, credential harvesting, and redirection to malware distribution pages. **Authentication/Session Flow Disruption** When users with valid sessions/cookies from the same origin click the link, they are redirected to unintended external domains, which can bypass or disrupt authentication/authorization flows. When combined with redirect-based flows like OAuth/OIDC, this can escalate into security incidents.

CVE-2025-62379 Affected Reflex Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
reflex
PyPI
≥ 0.5.4
≤ 0.8.14

References

Frequently Asked Questions

What is CVE-2025-62379?
CVE-2025-62379 is a security vulnerability in Reflex involving reflex-dev/reflex has an Open Redirect vulnerability under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Reflex versions are affected?
Affected versions include releases prior to current release patches across affected packages: reflex.
What version fixes CVE-2025-62379?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is reflex affected?
Yes, reflex is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-62379?
CVE-2025-62379 has a CVSS v3.1 base score of 3.1 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2025-62379?
CVE-2025-62379 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check PyPI dependencies for CVE-2025-62379?
Run the dependency tree command: 'pip show reflex'. 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-rfh5-c9h5-q8jm",
  "modified" : "2025-10-15T19:14:33Z",
  "published" : "2025-10-15T17:56:32Z",
  "aliases" : [ "CVE-2025-62379" ],
  "summary" : "reflex-dev/reflex has an Open Redirect vulnerability",
  "details" : "### Mitigation\n\nMake sure `GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN` is not set in a production environment. So the following is correct:\n\n```\nassert os.getenv(\"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN\") is None\n```\n\n### **Vulnerability Description**\n\n---\n\n**Vulnerability Overview**\n \n- When the GET /auth-codespace page loads in a GitHub Codespaces environment, it automatically assigns the redirect_to query parameter value directly to client-side links without any validation and triggers automatic clicks. This allows attackers to redirect users to arbitrary external URLs.\n- The route is only registered when a Codespaces environment is detected, and the detection is controlled by environment variables. This means that the same behavior can be activated in production if the corresponding environment variable is set.\n\n**Vulnerable Code Analysis**\n \n\nhttps://github.com/reflex-dev/reflex/blob/51f9f2c2f52cac4d66c07683a12bc0237311b6be/reflex/utils/codespaces.py#L18-L46\n\n- This code assigns the redirect_to query parameter directly to a.href without any validation and immediately triggers a click (automatic navigation), allowing users to be sent to arbitrary external domains, resulting in an open redirect vulnerability.\n- The execution condition is simply based on the presence of a sessionStorage flag, meaning it triggers immediately on first visits or in incognito/private browsing windows, with no server-side origin/scheme whitelist or internal path enforcement defenses in place.\n\n### PoC\n\n---\n\n**PoC Description**\n \n\n<img width=\"623\" height=\"497\" alt=\"image\" src=\"https://github.com/user-attachments/assets/55ef4828-09fa-451b-a7cc-8fcaad6a2a21\" />\n\n\n- Used the production configuration from docker-example (docker-example/production-compose).\n- Added a Codespaces detection environment variable to the app container in compose.yaml to forcibly expose the route.\n- GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN: dummy\n- The reverse proxy (Caddy) needs to be configured to forward /auth-codespace to the backend (required depending on the environment).\n\n**curl Example**\n\n\n```\nhttps://localhost/auth-codespace?redirect_to=http://google.com\n```\n\n**PoC MP4**\nhttps://file.notion.so/f/f/d105d145-04bc-45c5-b46c-ed880895e9de/a86c3e3b-f67f-45d1-8fa2-4aa0ba7d0068/poc.mp4?table=block&id=26955717-5d2e-805a-b53c-e25ee03f1d4b&spaceId=d105d145-04bc-45c5-b46c-ed880895e9de&expirationTimestamp=1760508000000&signature=ZPp8PVldfGOh0gB5tVElRV6GN789R-EG0oxZgkFjjLU&downloadName=poc.mp4\n\n<img width=\"1917\" height=\"949\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e565dc4e-a59b-44d4-a92a-ebf128489e88\" />\n\n<img width=\"1913\" height=\"977\" alt=\"image\" src=\"https://github.com/user-attachments/assets/496fa585-76ea-4d2d-80f8-0ab79f51229e\" />\n\n\n\n\n### Impact\n\n---\n\n**Phishing/Social Engineering Attacks**\n\n\nUsers can be exploited by immediately redirecting from a trusted domain to external malicious sites, taking advantage of user trust. This enables login page spoofing, credential harvesting, and redirection to malware distribution pages.\n\n**Authentication/Session Flow Disruption**\n \n\nWhen users with valid sessions/cookies from the same origin click the link, they are redirected to unintended external domains, which can bypass or disrupt authentication/authorization flows. When combined with redirect-based flows like OAuth/OIDC, this can escalate into security incidents.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "reflex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.5.4"
      }, {
        "last_affected" : "0.8.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/reflex-dev/reflex/security/advisories/GHSA-rfh5-c9h5-q8jm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62379"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/reflex-dev/reflex/commit/ade12549f3c0ddab3d7382c581bc04a3c1f989ec"
  }, {
    "type" : "WEB",
    "url" : "https://file.notion.so/f/f/d105d145-04bc-45c5-b46c-ed880895e9de/a86c3e3b-f67f-45d1-8fa2-4aa0ba7d0068/poc.mp4?table=block&id=26955717-5d2e-805a-b53c-e25ee03f1d4b&spaceId=d105d145-04bc-45c5-b46c-ed880895e9de&expirationTimestamp=1760508000000&signature=ZPp8PVldfGOh0gB5tVElRV6GN789R-EG0oxZgkFjjLU&downloadName=poc.mp4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/reflex-dev/reflex"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/reflex-dev/reflex/blob/51f9f2c2f52cac4d66c07683a12bc0237311b6be/reflex/utils/codespaces.py#L18-L46"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-15T17:56:32Z",
    "nvd_published_at" : "2025-10-15T16:15:36Z"
  }
}