Skip to main content

CVE-2021-34654: CWE-79 Cross-site Scripting (XSS) in Custom Post Type Relations Custom Post Type Relations

Medium
VulnerabilityCVE-2021-34654cvecve-2021-34654cwe-79
Published: Mon Aug 16 2021 (08/16/2021, 18:22:29 UTC)
Source: CVE
Vendor/Project: Custom Post Type Relations
Product: 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

AILast updated: 07/06/2025, 20:27:30 UTC

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.

Need more detailed analysis?Get Pro

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: 7/26/2025, 6:32:53 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats