Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-1757 Overview
CVE-2025-1757 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the WordPress Portfolio Builder – Portfolio Gallery plugin (also known as uber-grid) developed by portfoliohub. The flaw exists in the pfhub_portfolio and pfhub_portfolio_portfolio shortcodes and is caused by insufficient input sanitization and output escaping on user-supplied attributes. Authenticated users with contributor-level access or higher can inject arbitrary JavaScript into pages. The injected scripts execute in the browser of any user who views the affected page, including administrators. All plugin versions up to and including 1.1.7 are affected.
Critical Impact
Authenticated contributors can inject persistent JavaScript that executes against site visitors and administrators, enabling session theft, forced actions, and account takeover paths.
Affected Products
- Portfoliohub Portfolio Builder – Portfolio Gallery (uber-grid) plugin for WordPress
- All versions <= 1.1.7
- WordPress sites allowing contributor-level or higher accounts to use the affected shortcodes
Discovery Timeline
- 2025-02-28 - CVE-2025-1757 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-1757
Vulnerability Analysis
The vulnerability is a Stored Cross-Site Scripting flaw classified under [CWE-79]. The plugin registers two shortcodes, pfhub_portfolio and pfhub_portfolio_portfolio, which accept user-supplied attributes. The shortcode handlers in src/Frontend.php render these attributes into HTML output without applying adequate sanitization on input or escaping on output.
Because WordPress contributors can author posts containing shortcodes, an attacker with a low-privilege account can embed a malicious shortcode attribute that carries JavaScript. When an editor, administrator, or site visitor views the resulting page, the injected script executes in their browser session.
Successful exploitation requires authentication at the contributor level and user interaction to load the injected page. The scope change in the impact profile reflects that script execution occurs in the victim's browser context, outside the vulnerable component.
Root Cause
The root cause is missing input validation and missing output encoding on shortcode attributes rendered by the frontend code paths referenced at src/Frontend.php#L39 and src/Frontend.php#L542. The plugin trusts attribute values authored inside the WordPress editor and emits them into HTML markup without filtering through functions such as esc_attr(), esc_html(), or wp_kses().
Attack Vector
An authenticated attacker with contributor privileges inserts the vulnerable shortcode into a draft or published post and supplies an attribute value containing an HTML or JavaScript payload. For example, an attribute value crafted with event handlers such as onmouseover or breaking out of an attribute context using quotation marks and <script> tags leads to script execution when the page is rendered. The payload persists in the database and triggers each time the page is viewed, enabling cookie theft, forced administrative actions, and plugin or user manipulation via the WordPress REST API.
See the Wordfence Vulnerability Analysis and the plugin code at Frontend.php line 39 and Frontend.php line 542 for technical details.
Detection Methods for CVE-2025-1757
Indicators of Compromise
- Posts or pages containing pfhub_portfolio or pfhub_portfolio_portfolio shortcodes with attribute values that include <script, javascript:, onerror=, onload=, or onmouseover= patterns.
- Contributor or author accounts creating or editing posts that embed portfolio shortcodes with unusual attribute payloads.
- Outbound browser requests from administrator sessions to unfamiliar domains shortly after viewing posts containing the affected shortcodes.
Detection Strategies
- Scan the wp_posts table for shortcode attributes matching XSS payload signatures using SQL queries targeting the two affected shortcode names.
- Review WordPress audit logs for post creation or edits by contributor-level users that include portfolio shortcodes.
- Deploy a Web Application Firewall rule to flag or block shortcode attribute values containing HTML tags or JavaScript event handlers.
Monitoring Recommendations
- Monitor administrator session activity for anomalous REST API calls to /wp-json/wp/v2/users or plugin management endpoints following page previews.
- Alert on new or modified administrator accounts and on changes to user roles immediately after low-privilege users publish portfolio content.
- Track plugin inventory and version data to confirm uber-grid remains at a patched release across all WordPress hosts.
How to Mitigate CVE-2025-1757
Immediate Actions Required
- Update the Portfolio Builder – Portfolio Gallery plugin to a version later than 1.1.7 as soon as a patched release is available from the vendor.
- Audit all existing posts and pages containing pfhub_portfolio and pfhub_portfolio_portfolio shortcodes and remove any suspicious attribute content.
- Review contributor, author, and editor accounts, disable unused accounts, and reset credentials for any accounts suspected of abuse.
Patch Information
At the time of the latest NVD update, no fixed version is listed in the enriched CVE data. Site operators should monitor the plugin page on WordPress.org, the vendor's channels, and the Wordfence advisory for release notes announcing a security fix. Apply the update across all WordPress environments once available and verify the installed version is greater than 1.1.7.
Workarounds
- Deactivate and remove the Portfolio Builder – Portfolio Gallery plugin until a patched release is available if the functionality is not business-critical.
- Restrict shortcode usage by removing contributor and author permissions to publish or preview content that invokes the affected shortcodes.
- Deploy a WordPress security plugin or Web Application Firewall ruleset that strips HTML tags and JavaScript event handlers from shortcode attributes.
- Enforce the principle of least privilege by downgrading contributor accounts that do not require posting rights and enabling multi-factor authentication for all editorial roles.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

