Summary
The Rent Fetch plugin for WordPress contains a stored cross-site scripting (XSS) vulnerability in the keyword parameter due to missing input sanitization and output escaping.
Unauthenticated attackers can persistently inject malicious JavaScript into pages using the plugin, which runs in the browser of any user who later visits an affected page.
Affected context
This vulnerability occurs in WordPress sites that have the Rent Fetch plugin installed and active, in versions up to and including 0.32.4.
It is triggered when the plugin processes user-controlled content via the keyword parameter (for example, via shortcodes or front-end inputs) and then renders this value into page output without adequate HTML/JavaScript escaping.
The issue is present only where the plugin's functionality is exposed in public- or user-facing pages that can receive untrusted input.
Exploit preconditions
- Attack surface: Public web pages on a WordPress site using the Rent Fetch plugin.
- Required access: None; an attacker can be unauthenticated if they can reach functionality that accepts the
keywordparameter. - Trigger point: A victim visits a page where attacker-controlled data from the
keywordparameter is rendered by the plugin. - Why exploitation is possible: The plugin does not sufficiently sanitize user input nor escape the
keywordvalue on output, allowing raw HTML/JavaScript to be stored and later executed in users' browsers.
Why this happens
The underlying issue is a classic stored XSS pattern mapped to CWE-79: Improper Neutralization of Input During Web Page Generation.
User-supplied data in the keyword parameter is accepted without robust validation or stripping of scripting constructs and is subsequently reflected into HTML content without context-appropriate escaping.
Because the value is stored (e.g., in post content, plugin configuration, or database fields) and later rendered for other users, the malicious script persists across requests and affects multiple visitors.
Potential impact
- Theft of session cookies, nonces, or other sensitive browser-resident data
- Forced actions on behalf of authenticated users (including administrators) via cross-site request forgery-like behaviors initiated by injected scripts
- Defacement of site content or injection of phishing overlays and malicious redirects
- Installation of backdoors or creation of rogue admin accounts if an administrator visits a compromised page
- Browser-based malware delivery or tracking script injection
General mitigation guidance
Effective mitigation focuses on consistently treating user-controlled attributes as untrusted and ensuring context-aware output encoding:
- Apply strict input validation on the
keywordparameter, allowing only the minimal set of characters and formats required for legitimate use. - Use WordPress-provided sanitization functions for all incoming data and context-appropriate escaping functions (e.g., attribute, HTML, or URL escaping) on every output path.
- Design plugin features so that untrusted content is stored in a neutralized form, and avoid rendering raw user input directly into HTML, JavaScript, or inline event handlers.
- Limit the capability of anonymous or low-privilege users to submit rich or dynamic content wherever possible, favoring whitelists over blacklists.
- Operate with the principle of least privilege for plugin operations and avoid unnecessary exposure of configuration endpoints on public pages.
How teams detect issues like this
Detection typically involves both code-centric and runtime approaches:
- Static analysis / linting: Scan PHP and template files for direct echoing of
$_GET,$_POST, shortcode attributes, or other user-controlled sources without passing through WordPress escaping APIs. - Code review: Look for plugin code paths where the
keywordparameter or similar attributes are inserted into HTML, JavaScript, or attribute values without appropriate sanitization and escaping. - Security testing: Use automated web scanners or browser-based testing tools to inject benign XSS probes into the
keywordparameter and verify whether they are stored and executed. - Policy enforcement: Integrate secure coding standards for WordPress development into CI pipelines, enforcing required use of sanitization/escaping helpers and blocking merges that bypass them.

