CWE-601
AllowedURL Redirection to Untrusted Site ('Open Redirect')
Abstraction: Base · Status: Draft
The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.
2307 vulnerabilities reference this CWE, most recent first.
GHSA-PWC3-GH97-QJF2
Vulnerability from github – Published: 2022-05-14 03:38 – Updated: 2022-05-14 03:38F-Secure Radar (on-premises) before 2018-02-15 has an Unvalidated Redirect via the ReturnUrl parameter that triggers upon a user login.
{
"affected": [],
"aliases": [
"CVE-2018-6324"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-02-16T04:29:00Z",
"severity": "MODERATE"
},
"details": "F-Secure Radar (on-premises) before 2018-02-15 has an Unvalidated Redirect via the ReturnUrl parameter that triggers upon a user login.",
"id": "GHSA-pwc3-gh97-qjf2",
"modified": "2022-05-14T03:38:07Z",
"published": "2022-05-14T03:38:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-6324"
},
{
"type": "WEB",
"url": "http://oscarhjelm.com/blag/2018/02/f-secure-radar-login-page-unvalidated-redirect-vulnerability"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/103208"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-PWP5-Q92Q-2HMM
Vulnerability from github – Published: 2024-09-04 18:30 – Updated: 2024-09-04 18:30A vulnerability, which was classified as problematic, was found in LinuxOSsk Shakal-NG up to 1.3.3. Affected is an unknown function of the file comments/views.py. The manipulation of the argument next leads to open redirect. It is possible to launch the attack remotely. The name of the patch is ebd1c2cba59cbac198bf2fd5a10565994d4f02cb. It is recommended to apply a patch to fix this issue.
{
"affected": [],
"aliases": [
"CVE-2024-8412"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-04T16:15:09Z",
"severity": "MODERATE"
},
"details": "A vulnerability, which was classified as problematic, was found in LinuxOSsk Shakal-NG up to 1.3.3. Affected is an unknown function of the file comments/views.py. The manipulation of the argument next leads to open redirect. It is possible to launch the attack remotely. The name of the patch is ebd1c2cba59cbac198bf2fd5a10565994d4f02cb. It is recommended to apply a patch to fix this issue.",
"id": "GHSA-pwp5-q92q-2hmm",
"modified": "2024-09-04T18:30:58Z",
"published": "2024-09-04T18:30:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-8412"
},
{
"type": "WEB",
"url": "https://github.com/LinuxOSsk/Shakal-NG/issues/202"
},
{
"type": "WEB",
"url": "https://github.com/LinuxOSsk/Shakal-NG/issues/202#issuecomment-2325187434"
},
{
"type": "WEB",
"url": "https://github.com/LinuxOSsk/Shakal-NG/commit/ebd1c2cba59cbac198bf2fd5a10565994d4f02cb"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.276492"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.276492"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.400792"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-PWVJ-X9FW-77CX
Vulnerability from github – Published: 2022-05-24 16:57 – Updated: 2024-04-04 02:06JetBrains YouTrack versions before 2019.1.52545 allowed unbounded URL whitelisting because of Inclusion of Functionality from an Untrusted Control Sphere.
{
"affected": [],
"aliases": [
"CVE-2019-15041"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-10-01T20:15:00Z",
"severity": "MODERATE"
},
"details": "JetBrains YouTrack versions before 2019.1.52545 allowed unbounded URL whitelisting because of Inclusion of Functionality from an Untrusted Control Sphere.",
"id": "GHSA-pwvj-x9fw-77cx",
"modified": "2024-04-04T02:06:25Z",
"published": "2022-05-24T16:57:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-15041"
},
{
"type": "WEB",
"url": "https://blog.jetbrains.com/blog/2019/09/26/jetbrains-security-bulletin-q2-2019"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-PX6P-G8XC-79WP
Vulnerability from github – Published: 2023-09-05 09:30 – Updated: 2024-04-04 07:28Open redirect vulnerability in VI Web Client prior to 7.9.6 allows a remote unauthenticated attacker to redirect users to arbitrary web sites and conduct phishing attacks via a specially crafted URL.
{
"affected": [],
"aliases": [
"CVE-2023-38574"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-05T09:15:08Z",
"severity": "MODERATE"
},
"details": "Open redirect vulnerability in VI Web Client prior to 7.9.6 allows a remote unauthenticated attacker to redirect users to arbitrary web sites and conduct phishing attacks via a specially crafted URL.",
"id": "GHSA-px6p-g8xc-79wp",
"modified": "2024-04-04T07:28:48Z",
"published": "2023-09-05T09:30:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-38574"
},
{
"type": "WEB",
"url": "https://downloadvi.com/downloads/IPServer/v7.9/796232/v796232RN.pdf"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/jp/JVN60140221"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-PXJW-QPM2-C9FW
Vulnerability from github – Published: 2025-01-31 18:31 – Updated: 2025-02-03 18:30A Host Header Poisoning Open Redirect issue in slabiak Appointment Scheduler v.1.0.5 allows a remote attacker to redirect users to a malicious website, leading to potential credential theft, malware distribution, or other malicious activities.
{
"affected": [],
"aliases": [
"CVE-2024-42671"
],
"database_specific": {
"cwe_ids": [
"CWE-601",
"CWE-79"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-31T17:15:13Z",
"severity": "MODERATE"
},
"details": "A Host Header Poisoning Open Redirect issue in slabiak Appointment Scheduler v.1.0.5 allows a remote attacker to redirect users to a malicious website, leading to potential credential theft, malware distribution, or other malicious activities.",
"id": "GHSA-pxjw-qpm2-c9fw",
"modified": "2025-02-03T18:30:39Z",
"published": "2025-01-31T18:31:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42671"
},
{
"type": "WEB",
"url": "https://github.com/slabiak/AppointmentScheduler/issues/53"
},
{
"type": "WEB",
"url": "https://github.com/abbisQQ/Appointment-Scheduler-Host-Header-Poisoning-Open-Redirect/blob/main/README.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q2MX-J4X2-2H74
Vulnerability from github – Published: 2022-05-24 22:03 – Updated: 2022-05-24 22:03Impact
We found that this vulnerability is present when the developer is implementing an OAuth 1 provider (by extension, it means Twitter, which is the only built-in provider using OAuth 1), but upgrading is still recommended.
next-auth v3 users before version 3.29.3 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. See our migration guide)
next-auth v4 users before version 4.3.3 are impacted.
Patches
We've released patches for this vulnerability in:
- v3 -
3.29.3 - v4 -
4.3.3
You can do:
npm i next-auth@latest
or
yarn add next-auth@latest
or
pnpm add next-auth@latest
(This will update to the latest v4 version, but you can change latest to 3 if you want to stay on v3.)
Workarounds
If you are not able to upgrade for any reason, you can add the following configuration to your callbacks option:
// async redirect(url, baseUrl) { // v3
async redirect({ url, baseUrl }) { // v4
// Allows relative callback URLs
if (url.startsWith("/")) return `${baseUrl}${url}`
// Allows callback URLs on the same origin
else if (new URL(url).origin === baseUrl) return url
return baseUrl
}
References
This vulnerability was discovered right after https://github.com/nextauthjs/next-auth/security/advisories/GHSA-f9wg-5f46-cjmw was published and is very similar in nature.
Read more about the callbacks.redirect option in the documentation: https://next-auth.js.org/configuration/callbacks#redirect-callback
For more information
If you have any concerns, we request responsible disclosure, outlined here: https://next-auth.js.org/security#reporting-a-vulnerability
Timeline
The issue was reported 2022 April 20th, a response was sent out to the reporter 8 minutes after, and a patch was produced within a few days.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "next-auth"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.29.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "next-auth"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.3.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-29214"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": true,
"github_reviewed_at": "2022-05-24T22:03:07Z",
"nvd_published_at": "2022-05-21T00:15:00Z",
"severity": "MODERATE"
},
"details": "### Impact\n\nWe found that this vulnerability is present when the developer is implementing an OAuth 1 provider (by extension, it means Twitter, which is the only built-in provider using OAuth 1), but **upgrading** is **still recommended**.\n\n`next-auth` v3 users before version 3.29.3 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. See our [migration guide](https://next-auth.js.org/getting-started/upgrade-v4))\n\n`next-auth` v4 users before version 4.3.3 are impacted.\n\n### Patches\n\nWe\u0027ve released patches for this vulnerability in:\n \n- v3 - `3.29.3`\n- v4 - `4.3.3`\n\nYou can do:\n\n```sh\nnpm i next-auth@latest\n```\n\nor\n\n```sh\nyarn add next-auth@latest\n```\n\nor\n\n```sh\npnpm add next-auth@latest\n```\n\n(This will update to the latest v4 version, but you can change `latest` to `3` if you want to stay on v3.)\n\n### Workarounds\n\nIf you are not able to upgrade for any reason, you can add the following configuration to your `callbacks` option:\n\n```ts\n// async redirect(url, baseUrl) { // v3\nasync redirect({ url, baseUrl }) { // v4\n // Allows relative callback URLs\n if (url.startsWith(\"/\")) return `${baseUrl}${url}`\n // Allows callback URLs on the same origin\n else if (new URL(url).origin === baseUrl) return url\n return baseUrl\n}\n```\n\n### References\n\nThis vulnerability was discovered right after https://github.com/nextauthjs/next-auth/security/advisories/GHSA-f9wg-5f46-cjmw was published and is very similar in nature.\n\nRead more about the `callbacks.redirect` option in the documentation: https://next-auth.js.org/configuration/callbacks#redirect-callback\n\n### For more information\n\nIf you have any concerns, we request responsible disclosure, outlined here: https://next-auth.js.org/security#reporting-a-vulnerability\n\n### Timeline\n\nThe issue was reported 2022 April 20th, a response was sent out to the reporter 8 minutes after, and a patch was produced within a few days.",
"id": "GHSA-q2mx-j4x2-2h74",
"modified": "2022-05-24T22:03:07Z",
"published": "2022-05-24T22:03:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nextauthjs/next-auth/security/advisories/GHSA-q2mx-j4x2-2h74"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29214"
},
{
"type": "PACKAGE",
"url": "https://github.com/nextauthjs/next-auth"
},
{
"type": "WEB",
"url": "https://github.com/nextauthjs/next-auth/releases/tag/next-auth%40v4.3.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "URL Redirection to Untrusted Site (\u0027Open Redirect\u0027) in next-auth"
}
GHSA-Q324-XR3G-8G3F
Vulnerability from github – Published: 2023-12-13 12:30 – Updated: 2023-12-13 12:30Open redirect vulnerability has been found in the Open CMS product affecting versions 14 and 15 of the 'Mercury' template. An attacker could create a specially crafted URL and send it to a specific user to redirect them to a malicious site and compromise them. Exploitation of this vulnerability is possible due to the fact that there is no proper sanitization of the 'URI' parameter.
{
"affected": [],
"aliases": [
"CVE-2023-6380"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-13T11:15:07Z",
"severity": "MODERATE"
},
"details": "Open redirect vulnerability has been found in the Open CMS product affecting versions 14 and 15 of the \u0027Mercury\u0027 template. An attacker could create a specially crafted URL and send it to a specific user to redirect them to a malicious site and compromise them. Exploitation of this vulnerability is possible due to the fact that there is no proper sanitization of the \u0027URI\u0027 parameter.",
"id": "GHSA-q324-xr3g-8g3f",
"modified": "2023-12-13T12:30:43Z",
"published": "2023-12-13T12:30:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-6380"
},
{
"type": "WEB",
"url": "https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-alkacon-software-opencms"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q342-7M92-3WGM
Vulnerability from github – Published: 2023-01-03 03:30 – Updated: 2025-04-10 15:31In affected versions of Octopus Deploy users of certain browsers using AD to sign-in to Octopus Server were able to bypass authentication checks and be redirected to the configured redirect url without any validation.
{
"affected": [],
"aliases": [
"CVE-2022-3614"
],
"database_specific": {
"cwe_ids": [
"CWE-288",
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-03T02:15:00Z",
"severity": "MODERATE"
},
"details": "In affected versions of Octopus Deploy users of certain browsers using AD to sign-in to Octopus Server were able to bypass authentication checks and be redirected to the configured redirect url without any validation.",
"id": "GHSA-q342-7m92-3wgm",
"modified": "2025-04-10T15:31:22Z",
"published": "2023-01-03T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3614"
},
{
"type": "WEB",
"url": "https://advisories.octopus.com/post/2022/sa2022-26"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q34J-6XQH-3786
Vulnerability from github – Published: 2023-12-29 12:30 – Updated: 2026-04-28 21:33URL Redirection to Untrusted Site ('Open Redirect') vulnerability in PluginOps MailChimp Subscribe Form, Optin Builder, PopUp Builder, Form Builder.This issue affects MailChimp Subscribe Form, Optin Builder, PopUp Builder, Form Builder: from n/a through 4.0.9.3.
{
"affected": [],
"aliases": [
"CVE-2023-32517"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-29T10:15:10Z",
"severity": "MODERATE"
},
"details": "URL Redirection to Untrusted Site (\u0027Open Redirect\u0027) vulnerability in PluginOps MailChimp Subscribe Form, Optin Builder, PopUp Builder, Form Builder.This issue affects MailChimp Subscribe Form, Optin Builder, PopUp Builder, Form Builder: from n/a through 4.0.9.3.",
"id": "GHSA-q34j-6xqh-3786",
"modified": "2026-04-28T21:33:38Z",
"published": "2023-12-29T12:30:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-32517"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/mailchimp-subscribe-sm/wordpress-mailchimp-subscribe-forms-plugin-4-0-9-1-open-redirection-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q3M9-9FJ2-MFWR
Vulnerability from github – Published: 2021-08-05 17:02 – Updated: 2024-10-21 20:06Impact
Various parts of Plone use the 'is url in portal' check for security, mostly to see if it is safe to redirect to a url. A url like https://example.org is not in the portal.
But the url https:example.org without slashes tricks our code and it is considered to be in the portal.
When redirecting, some browsers go to https://example.org, others give an error.
Attackers may use this to redirect you to their site, especially as part of a phishing attack.
Patches
The problem has been patched in Products.isurlinportal 1.2.0.
This is a recommended upgrade for all users of Plone 4.3 and 5, on Python 2.7 or higher.
It has not been tested on earlier Plone or Python versions.
Upcoming Plone 5.2.5 and higher will include the new version.
Discovered
This vulnerability was discovered and reported by Yuji Tounai of Mitsui Bussan Secure Directions, Inc. Thank you!
For more information
If you have any questions or comments about this advisory: * Email the Plone Security Team at security@plone.org, especially when you think you have discovered a security problem or when you are not sure. * Open an issue in the tracker if your question or comment can be public.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "Products.isurlinportal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.2.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-32806"
],
"database_specific": {
"cwe_ids": [
"CWE-601"
],
"github_reviewed": true,
"github_reviewed_at": "2021-08-02T23:19:30Z",
"nvd_published_at": "2021-08-02T19:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\nVarious parts of Plone use the \u0027is url in portal\u0027 check for security, mostly to see if it is safe to redirect to a url. A url like `https://example.org` is not in the portal.\nBut the url `https:example.org` without slashes tricks our code and it _is_ considered to be in the portal.\nWhen redirecting, some browsers go to `https://example.org`, others give an error.\nAttackers may use this to redirect you to their site, especially as part of a phishing attack.\n\n### Patches\nThe problem has been patched in `Products.isurlinportal` 1.2.0.\nThis is a recommended upgrade for all users of Plone 4.3 and 5, on Python 2.7 or higher.\nIt has not been tested on earlier Plone or Python versions.\nUpcoming Plone 5.2.5 and higher will include the new version.\n\n### Discovered\nThis vulnerability was discovered and reported by Yuji Tounai of Mitsui Bussan Secure Directions, Inc. Thank you!\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email the Plone Security Team at [security@plone.org](mailto:security@plone.org), especially when you think you have discovered a security problem or when you are not sure.\n* Open an issue in [the tracker](https://github.com/plone/Products.isurlinportal/issues) if your question or comment can be public.\n",
"id": "GHSA-q3m9-9fj2-mfwr",
"modified": "2024-10-21T20:06:22Z",
"published": "2021-08-05T17:02:12Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/plone/Products.isurlinportal/security/advisories/GHSA-q3m9-9fj2-mfwr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32806"
},
{
"type": "WEB",
"url": "https://github.com/plone/Products.isurlinportal/commit/d4fd34990d18adf05a10dc5e2bb4b066798280ba"
},
{
"type": "PACKAGE",
"url": "https://github.com/plone/Products.isurlinportal"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/products-isurlinportal/PYSEC-2021-323.yaml"
},
{
"type": "WEB",
"url": "http://jvn.jp/en/jp/JVN50804280/index.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "URL Redirection to Untrusted Site (\u0027Open Redirect\u0027) in Products.isurlinportal"
}
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- Use a list of approved URLs or domains to be used for redirection.
Mitigation
Use an intermediate disclaimer page that provides the user with a clear warning that they are leaving the current site. Implement a long timeout before the redirect occurs, or force the user to click on the link. Be careful to avoid XSS problems (CWE-79) when generating the disclaimer page.
Mitigation MIT-21.2
Strategy: Enforcement by Conversion
- When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
- For example, ID 1 could map to "/login.asp" and ID 2 could map to "http://www.example.com/". Features such as the ESAPI AccessReferenceMap [REF-45] provide this capability.
Mitigation
Ensure that no externally-supplied requests are honored by requiring that all redirect requests include a unique nonce generated by the application [REF-483]. Be sure that the nonce is not predictable (CWE-330).
Mitigation MIT-6
Strategy: Attack Surface Reduction
- Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
- Many open redirect problems occur because the programmer assumed that certain inputs could not be modified, such as cookies and hidden form fields.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
CAPEC-178: Cross-Site Flashing
An attacker is able to trick the victim into executing a Flash document that passes commands or calls to a Flash player browser plugin, allowing the attacker to exploit native Flash functionality in the client browser. This attack pattern occurs where an attacker can provide a crafted link to a Flash document (SWF file) which, when followed, will cause additional malicious instructions to be executed. The attacker does not need to serve or control the Flash document. The attack takes advantage of the fact that Flash files can reference external URLs. If variables that serve as URLs that the Flash application references can be controlled through parameters, then by creating a link that includes values for those parameters, an attacker can cause arbitrary content to be referenced and possibly executed by the targeted Flash application.