CVE-2021-34654: CWE-79 Cross-site Scripting (XSS) in Custom Post Type Relations Custom Post Type Relations
The Custom Post Type Relations WordPress plugin is vulnerable to Reflected Cross-Site Scripting via the cptr[name] parameter found in the ~/pages/admin-page.php file which allows attackers to inject arbitrary web scripts, in versions up to and including 1.0.
AI Analysis
Technical Summary
CVE-2021-34654 is a Reflected Cross-Site Scripting (XSS) vulnerability identified in the Custom Post Type Relations WordPress plugin, specifically affecting version 1.0 and earlier. The vulnerability arises from improper sanitization of the 'cptr[name]' parameter in the ~/pages/admin-page.php file. An attacker can craft a malicious URL containing a specially crafted payload in this parameter, which when visited by an authenticated or unauthenticated user (depending on the context), causes the injected script to be executed in the victim's browser. This reflected XSS vulnerability allows attackers to execute arbitrary JavaScript code, potentially leading to session hijacking, defacement, redirection to malicious sites, or other client-side attacks. The CVSS v3.1 base score is 6.1, reflecting a medium severity level, with an attack vector of network (remote), low attack complexity, no privileges required, but requiring user interaction (clicking a crafted link). The scope is changed, indicating that the vulnerability affects components beyond the initially vulnerable component, and impacts confidentiality and integrity but not availability. No known exploits in the wild have been reported to date. The vulnerability is categorized under CWE-79, which covers improper neutralization of input during web page generation. Since the plugin is used within WordPress environments, the attack surface includes websites using this plugin, which may be targeted by attackers to compromise site visitors or administrators through malicious script execution.
Potential Impact
For European organizations, the impact of this vulnerability depends on the extent of usage of the Custom Post Type Relations plugin within their WordPress infrastructure. Exploitation could lead to unauthorized disclosure of sensitive information such as authentication cookies or tokens, enabling session hijacking and unauthorized access. This could compromise the integrity of the website content and user data, potentially damaging organizational reputation and trust. Since the vulnerability is reflected XSS, it requires user interaction, typically through social engineering (e.g., phishing emails with malicious links). European organizations with public-facing WordPress sites using this plugin are at risk of targeted attacks aiming to steal credentials or deliver further malware payloads. The vulnerability does not directly affect availability but can indirectly cause service disruptions if attackers deface sites or inject malicious content. Given the GDPR regulations in Europe, any data breach resulting from exploitation could lead to regulatory penalties and legal consequences.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should immediately update or patch the Custom Post Type Relations plugin to a version that addresses CVE-2021-34654 if available. If no patch exists, temporarily disabling or removing the plugin is recommended to eliminate the attack vector. Additionally, implement strict input validation and output encoding on all user-supplied inputs, especially parameters like 'cptr[name]', to prevent script injection. Employ Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts in browsers. Regularly audit WordPress plugins for vulnerabilities and maintain an inventory of installed plugins to quickly identify and remediate risks. Educate users and administrators about phishing risks to reduce the likelihood of successful exploitation via social engineering. Finally, monitor web server logs and security tools for suspicious activities related to XSS attempts targeting the affected parameter.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden
CVE-2021-34654: CWE-79 Cross-site Scripting (XSS) in Custom Post Type Relations Custom Post Type Relations
Description
The Custom Post Type Relations WordPress plugin is vulnerable to Reflected Cross-Site Scripting via the cptr[name] parameter found in the ~/pages/admin-page.php file which allows attackers to inject arbitrary web scripts, in versions up to and including 1.0.
AI-Powered Analysis
Technical Analysis
CVE-2021-34654 is a Reflected Cross-Site Scripting (XSS) vulnerability identified in the Custom Post Type Relations WordPress plugin, specifically affecting version 1.0 and earlier. The vulnerability arises from improper sanitization of the 'cptr[name]' parameter in the ~/pages/admin-page.php file. An attacker can craft a malicious URL containing a specially crafted payload in this parameter, which when visited by an authenticated or unauthenticated user (depending on the context), causes the injected script to be executed in the victim's browser. This reflected XSS vulnerability allows attackers to execute arbitrary JavaScript code, potentially leading to session hijacking, defacement, redirection to malicious sites, or other client-side attacks. The CVSS v3.1 base score is 6.1, reflecting a medium severity level, with an attack vector of network (remote), low attack complexity, no privileges required, but requiring user interaction (clicking a crafted link). The scope is changed, indicating that the vulnerability affects components beyond the initially vulnerable component, and impacts confidentiality and integrity but not availability. No known exploits in the wild have been reported to date. The vulnerability is categorized under CWE-79, which covers improper neutralization of input during web page generation. Since the plugin is used within WordPress environments, the attack surface includes websites using this plugin, which may be targeted by attackers to compromise site visitors or administrators through malicious script execution.
Potential Impact
For European organizations, the impact of this vulnerability depends on the extent of usage of the Custom Post Type Relations plugin within their WordPress infrastructure. Exploitation could lead to unauthorized disclosure of sensitive information such as authentication cookies or tokens, enabling session hijacking and unauthorized access. This could compromise the integrity of the website content and user data, potentially damaging organizational reputation and trust. Since the vulnerability is reflected XSS, it requires user interaction, typically through social engineering (e.g., phishing emails with malicious links). European organizations with public-facing WordPress sites using this plugin are at risk of targeted attacks aiming to steal credentials or deliver further malware payloads. The vulnerability does not directly affect availability but can indirectly cause service disruptions if attackers deface sites or inject malicious content. Given the GDPR regulations in Europe, any data breach resulting from exploitation could lead to regulatory penalties and legal consequences.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should immediately update or patch the Custom Post Type Relations plugin to a version that addresses CVE-2021-34654 if available. If no patch exists, temporarily disabling or removing the plugin is recommended to eliminate the attack vector. Additionally, implement strict input validation and output encoding on all user-supplied inputs, especially parameters like 'cptr[name]', to prevent script injection. Employ Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts in browsers. Regularly audit WordPress plugins for vulnerabilities and maintain an inventory of installed plugins to quickly identify and remediate risks. Educate users and administrators about phishing risks to reduce the likelihood of successful exploitation via social engineering. Finally, monitor web server logs and security tools for suspicious activities related to XSS attempts targeting the affected parameter.
Affected Countries
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Wordfence
- Date Reserved
- 2021-06-10T00:00:00.000Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d981dc4522896dcbdaf0b
Added to database: 5/21/2025, 9:08:45 AM
Last enriched: 7/6/2025, 8:27:30 PM
Last updated: 2/7/2026, 12:57:35 PM
Views: 38
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-2085: Command Injection in D-Link DWR-M921
HighCVE-2026-2084: OS Command Injection in D-Link DIR-823X
HighCVE-2026-2083: SQL Injection in code-projects Social Networking Site
MediumCVE-2026-2082: OS Command Injection in D-Link DIR-823X
MediumCVE-2026-2080: Command Injection in UTT HiPER 810
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.