CVE-2024-13741
Executive Summary
CVE-2024-13741 is a Limited Server-Side Request Forgery (SSRF) vulnerability in the ProfileGrid – User Profiles, Groups and Communities plugin for WordPress. This flaw affects all versions up to and including 5.9.4.2. The vulnerability resides in the pm_upload_image function, allowing authenticated attackers with Subscriber-level access or higher to make arbitrary web requests from the server. This can be used to download and view images, as well as validate the existence of non-image files on local or remote hosts. The CVSS score is 5.4 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch details are available.
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
WordPress Ecosystem Context
This vulnerability is specific to the ProfileGrid plugin within the WordPress ecosystem. It does not affect Apache or Nginx directly, but rather the plugin's handling of image uploads. The attack vector is through authenticated HTTP requests, leveraging the plugin's functionality to perform SSRF.
CVSS Breakdown & Threat Level
- CVSS Score: 5.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Subscriber-level)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low (limited file read)
- Integrity Impact: None
- Availability Impact: None
The threat level is considered Medium due to the authenticated requirement and limited impact (only file read/existence check). However, SSRF can be chained with other vulnerabilities for more severe attacks.
Deep Dive & Mechanics
The vulnerability exists in the pm_upload_image function of the ProfileGrid plugin. This function is intended to handle image uploads from users. However, it fails to properly validate the URL or file path provided by the user, allowing an attacker to specify arbitrary URLs or local file paths.
How it works:
- An authenticated user (Subscriber or higher) triggers the
pm_upload_imagefunction via a crafted request. - The function accepts a URL or file path parameter without adequate sanitization.
- The server then makes an HTTP request to the attacker-specified URL (SSRF) or reads a local file.
- The response (image or file content) is processed and potentially returned to the attacker.
Impact:
- Remote SSRF: Attacker can make requests to internal services (e.g., cloud metadata endpoints, internal APIs) or external hosts.
- Local File Read: Attacker can read non-image files from the server (e.g.,
/etc/passwd, configuration files) by checking if they exist or by downloading them if they are treated as images. - Limited Scope: Only image files can be downloaded/viewed, but existence of any file can be validated.
Vulnerable vs. Patched Code
Since no patch is available, we analyze the vulnerable code pattern. The vulnerable function likely uses file_get_contents() or curl_exec() without proper validation.
Vulnerable Code (Conceptual):
function pm_upload_image($url) {
// No validation of $url
$image_data = file_get_contents($url);
// Process image...
}
Patched Code (Expected):
function pm_upload_image($url) {
// Validate URL scheme and host
$allowed_schemes = array('http', 'https');
$parsed_url = parse_url($url);
if (!in_array($parsed_url['scheme'], $allowed_schemes)) {
return false;
}
// Restrict to allowed domains or use a whitelist
$allowed_hosts = array('example.com', 'images.example.com');
if (!in_array($parsed_url['host'], $allowed_hosts)) {
return false;
}
// Validate that the file is an image
$image_data = file_get_contents($url);
if (!@getimagesizefromstring($image_data)) {
return false;
}
// Process image...
}
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- WordPress instance with ProfileGrid plugin <= 5.9.4.2
- Authenticated user with Subscriber role or higher
Exploitation Steps:
- Log in as a subscriber.
- Craft a POST request to the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.phpwith actionpm_upload_image). - Set the
image_urlparameter to a target URL (e.g.,http://169.254.169.254/latest/meta-data/for AWS metadata). - The server will fetch the URL and return the content if it's an image, or validate existence.
Example Request:
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target-wordpress-site.com
Content-Type: application/x-www-form-urlencoded
Cookie: wordpress_logged_in_...
action=pm_upload_image&image_url=http://169.254.169.254/latest/meta-data/
Note: Since no public exploit exists, this is a conceptual demonstration.
Blue Team (Defender)
Detection:
- Monitor for unusual outbound HTTP requests from the web server to internal IPs (e.g., 169.254.169.254, 10.x.x.x, 172.x.x.x).
- Look for requests to
admin-ajax.phpwith actionpm_upload_imageand suspiciousimage_urlparameters. - Check for file read attempts via
file://scheme in theimage_urlparameter.
Hunting:
- Search web server logs for
pm_upload_imageaction with non-image URLs. - Use network monitoring to detect SSRF patterns.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests to internal IPs (e.g., 169.254.169.254, 10.0.0.1, 192.168.1.1)
- Requests to
file://scheme inimage_urlparameter
- File System:
- Unexpected files in upload directories (e.g.,
/etc/passwdcontent saved as image)
- Unexpected files in upload directories (e.g.,
- Logs:
- Web server logs showing
pm_upload_imageaction with suspicious URLs - PHP error logs indicating failed file reads
- Web server logs showing
Detection Engineering
YARA Rule
rule Detect_ProfileGrid_SSRF_Attempt {
meta:
description = "Detects SSRF attempts via ProfileGrid pm_upload_image function"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-13741"
strings:
$action = "pm_upload_image"
$url_param = "image_url"
$internal_ip = /(169\.254\.169\.254|10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})/
$file_scheme = "file://"
condition:
$action and $url_param and ($internal_ip or $file_scheme)
}
Sigma Rule
title: ProfileGrid SSRF Attempt
id: 8f4a2b1c-3d5e-4f7a-9b8c-1d2e3f4a5b6c
status: experimental
description: Detects SSRF attempts via ProfileGrid pm_upload_image function
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-13741
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains: 'action=pm_upload_image'
cs-uri-query|contains: 'image_url='
filter:
cs-uri-query|contains:
- 'image_url=http://'
- 'image_url=https://'
condition: selection and not filter
falsepositives:
- Legitimate image uploads from external sources
level: medium
tags:
- attack.t1190
- cve.2024.13741
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-13741 ProfileGrid SSRF Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=pm_upload_image"; http_client_body; content:"image_url="; http_client_body; pcre:"/image_url=(file:\/\/|https?:\/\/(169\.254\.169\.254|10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3}))/Ri"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not essential, until a patch is released.
- Restrict outbound traffic from the web server using firewall rules (e.g., block access to internal IPs).
- Implement Web Application Firewall (WAF) rules to block requests with suspicious
image_urlparameters.
Long-term Fix:
- Apply the official patch once released by ProfileGrid.
- Upgrade to a patched version when available.
- Conduct code review to ensure proper input validation and URL sanitization.
Workarounds:
- Use a security plugin to monitor and block SSRF attempts.
- Limit user roles to prevent subscribers from uploading images (if possible).
Valters IT
Securing Digital Frontiers