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-2024-3097 Overview
CVE-2024-3097 affects the NextGEN Gallery plugin for WordPress, developed by Imagely. The vulnerability stems from a missing capability check on the get_item function in the Block.php REST endpoint. All versions up to and including 3.59 are affected. Unauthenticated attackers can retrieve EXIF data and other metadata from any image uploaded through the plugin by sending unauthenticated requests to the exposed REST route. The flaw is categorized as Missing Authorization [CWE-862]. NextGEN Gallery is deployed on a large number of WordPress sites, which expands the exposure surface for data harvesting. The EPSS score of 38.023% (98th percentile) reflects elevated exploitation likelihood relative to the broader CVE corpus.
Critical Impact
Unauthenticated remote attackers can extract EXIF metadata, including embedded GPS coordinates, camera identifiers, and timestamps, from any image hosted by the plugin.
Affected Products
- Imagely NextGEN Gallery plugin for WordPress, versions <= 3.59
- WordPress sites exposing the plugin's /wp-json REST routes to the internet
- Media libraries managed through NextGEN Gallery with EXIF-tagged photographs
Discovery Timeline
- 2024-04-09 - CVE-2024-3097 published to the National Vulnerability Database
- 2026-06-17 - Last updated in the NVD database
Technical Details for CVE-2024-3097
Vulnerability Analysis
The vulnerability resides in the plugin's REST API handler for the Gutenberg block integration at src/REST/Admin/Block.php. The get_item callback registered on the route lacks a permission_callback that enforces user capability checks. WordPress treats routes with permissive callbacks as publicly accessible. As a result, any client issuing an HTTP GET request to the endpoint receives image metadata without authentication. The response includes EXIF fields extracted during image upload, such as camera make and model, software version, original capture timestamp, and GPS latitude and longitude when present in the source file.
The disclosure is limited to metadata associated with images already stored through the plugin. It does not grant write access or expose administrative data outside the gallery module. However, EXIF leakage can deanonymize photo subjects, reveal physical locations of users, and support reconnaissance against protected or members-only galleries.
Root Cause
The root cause is an authorization gap. The REST route registration omits a current_user_can check inside the permission_callback, defaulting to open access. The fix in changeset #3063940 adds a proper capability check so only authorized users can invoke get_item. See the NextGEN Gallery Changeset #3063940 and the pre-patch handler in the WordPress NextGEN Gallery Block Code for the source-level diff.
Attack Vector
Exploitation requires only network access to the target WordPress site. The attacker issues an unauthenticated HTTP request to the vulnerable REST endpoint and parses the JSON response. No user interaction, session, or credentials are necessary. A public proof-of-concept video is referenced in the GitHub PoC Video for NextGEN Gallery and the vulnerability intelligence is tracked in the Wordfence Vulnerability ID 75f87f99 entry.
No verified exploit code is published in the enriched dataset, so the attack mechanism is described in prose only. Automated scanners can enumerate image identifiers and iterate requests to harvest metadata at scale.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2024-3097
Indicators of Compromise
- Unauthenticated HTTP GET requests to /wp-json/nextgen-gallery/v*/ block endpoints originating from a single IP in rapid succession
- Responses from the plugin's REST routes returning JSON bodies containing EXIF fields such as GPSLatitude, GPSLongitude, or DateTimeOriginal
- Access log patterns showing enumeration of sequential image or gallery identifiers against the Block.php route
Detection Strategies
- Review web server access logs for requests to NextGEN Gallery REST routes without an associated wordpress_logged_in_* cookie
- Deploy WAF rules that flag or block unauthenticated requests to /wp-json/.*nextgen.*/ returning JSON payloads with EXIF keys
- Correlate repeated low-privilege REST requests with volumetric metadata extraction to identify scraping behavior
Monitoring Recommendations
- Enable verbose REST API logging on WordPress installations running NextGEN Gallery versions at or below 3.59
- Monitor outbound bandwidth from the WordPress host for anomalous JSON transfer sizes consistent with bulk metadata harvesting
- Alert on new user agents or geographies interacting with gallery REST endpoints that are not referenced by the public site templates
How to Mitigate CVE-2024-3097
Immediate Actions Required
- Upgrade the NextGEN Gallery plugin to a version later than 3.59 that includes changeset #3063940
- Audit existing images for sensitive EXIF data and strip location metadata where retention is not required
- Restrict access to /wp-json/ endpoints from untrusted networks using a WAF or reverse proxy ACL until patching is complete
Patch Information
Imagely addressed the issue in the plugin repository via changeset #3063940, which adds a capability check to the get_item REST callback in src/REST/Admin/Block.php. Administrators should update through the WordPress plugin dashboard or by deploying the patched release artifact. Confirm the installed version is above 3.59 after upgrade.
Workarounds
- Temporarily disable the NextGEN Gallery plugin on sites that cannot be patched immediately
- Block unauthenticated access to the specific REST route at the web server or WAF layer using path-based rules
- Use an exif_read_data preprocessor or server-side upload hook to strip EXIF metadata from new uploads, reducing the sensitivity of any data still exposed
# Example nginx rule to block unauthenticated access to the vulnerable REST route
location ~ ^/wp-json/.*nextgen.*/ {
if ($http_cookie !~* "wordpress_logged_in_") {
return 403;
}
}
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

