CWEweakness
CWE-1022 Use of Web Link to Untrusted Target with window.opener Access
Medium
Official page ↗
- Alternate terms
- tabnabbing
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Likelihood of exploit
- Medium
- Languages
- JavaScript, Not Language-Specific
- CWE version
- 5.0
Description
The web application produces links to untrusted external sites outside of its sphere of control, but it does not properly prevent the external site from modifying security-critical properties of the window.opener object, such as the location property.
Common consequences
• Confidentiality: Alter Execution Logic — If an attacker can run script on the target page, then they could read or modify certain properties of the window.opener object, including the location property - even if the original and target site are not the same origin. An attacker can modify the location property to automatically redirect the user to an untrusted page that contains undesired content or malicious script code, e.g. as part of a phishing attack. Since this redirect happens in the original window/tab - which is not necessarily visible, since the browser is focusing the display on the new target page - the user might not notice any suspicious redirection.
Potential mitigations
• [Architecture and Design] Specify in the design that any linked external document must not be granted access to the location object of the calling page.
• [Implementation] When creating a link to an external document using the <a> tag with a defined target, for example "_blank" or a named frame, provide the rel attribute with a value "noopener noreferrer".
If opening the external document in a new window via javascript, then reset the opener by setting it equal to null.
• [Implementation] Do not use "_blank" targets. However, this can affect the usability of the application.
Detection methods
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Observed examples
• CVE-2022-4927: Library software does not use rel: "noopener noreferrer" setting, allowing tabnabbing attacks to redirect to a malicious page
Related
Observed example · CVE (1)
- CVE-2022-4927 A vulnerability was found in ualbertalib NEOSDiscovery 1.0.70 and classified as problematic. vulnerability
Child of · CWE (1)
- CWE-266 Incorrect Privilege Assignment weakness
Referenced by CVE · weakness (14)
- CVE-2025-27902 IBM DB2 Recovery Expert for Linux, UNIX and Windows 5.5 IF 2 uses a web link with untrusted references to an external site. vulnerability
- CVE-2026-71555 PILOS (Platform for Interactive Live-Online Seminars) is a frontend for BigBlueButton. vulnerability
- CVE-2025-59842 jupyterlab is an extensible environment for interactive and reproducible computing, based on the Jupyter Notebook Architecture. vulnerability
- CVE-2025-42941 SAP Fiori (Launchpad) is vulnerable to Reverse Tabnabbing vulnerability due to inadequate external navigation protections for its link… vulnerability
- CVE-2025-33014 IBM Sterling B2B Integrator and IBM Sterling File Gateway 6.0.0.0 through 6.1.2.7 and 6.2.0.0 through 6.2.0.4 uses a web link with… vulnerability
- CVE-2024-39727 IBM Engineering Lifecycle Optimization - Engineering Insights 7.0.2 and 7.0.3 uses a web link with untrusted references to an external site. vulnerability
- CVE-2018-25089 A vulnerability was found in glb Meetup Tag Extension 0.1 on MediaWiki. vulnerability
- CVE-2022-4927 A vulnerability was found in ualbertalib NEOSDiscovery 1.0.70 and classified as problematic. vulnerability
- CVE-2018-25058 A vulnerability classified as problematic has been found in Twitter-Post-Fetcher up to 17.x. vulnerability
- CVE-2020-36624 A vulnerability was found in ahorner text-helpers up to 1.0.x. vulnerability
- CVE-2022-2600 The Auto-hyperlink URLs WordPress plugin through 5.4.1 does not set rel="noopener noreferer" on generated links, which can lead to Tab… vulnerability
- CVE-2022-1583 The External Links in New Window / New Tab WordPress plugin before 1.43 does not ensure window.opener is set to "null" when links to… vulnerability
- CVE-2021-33697 Under certain conditions, SAP BusinessObjects Business Intelligence Platform (SAPUI5), versions - 420, 430, can allow an unauthenticated… vulnerability
- CVE-2021-39112 Affected versions of Atlassian Jira Server and Data Center allow remote attackers to redirect users to a malicious URL via a reverse… vulnerability
Referenced by OWASP · mapped cwe (1)
- A06:2025 Insecure Design Top 10 2025