CVE-2026-141540 — Ebyhr Trino-storage (477) — CWE-73
External control of file path in trino-storage plugin for trinodb by ebyhr versions through 477 allows remote authenticated attackers to read arbitrary files and retrieve arbitrary HTTP/HTTPS URLs and view contents via collecting data from common resource locations and server-side request forgery
External control of file path in trino-storage plugin for trinodb by ebyhr versions through 477 allows remote authenticated attackers to read arbitrary files and retrieve arbitrary HTTP/HTTPS URLs and view contents via collecting data from common resource locations and server-side request forgery
🎯 What is this vulnerability?
This vulnerability is a Server-Side Request Forgery (SSRF) combined with Path Traversal (CWE-73: External Control of File Path) in the trino-storage plugin for Apache Trino (formerly PrestoSQL).
Technical Flaw Analysis:
The trino-storage plugin (version 477 and earlier) fails to properly sanitize or validate user-supplied input that determines file paths or URLs for data retrieval. Specifically:
1. Path Traversal: The plugin allows an authenticated user to manipulate the file path parameter to escape the intended directory scope, enabling the reading of arbitrary local files on the Trino server (e.g., /etc/passwd, application configuration files, or private keys).
2. SSRF: The plugin allows an authenticated user to specify an arbitrary HTTP/HTTPS URL. The Trino server will then initiate a request to this URL on behalf of the attacker. This allows the attacker to:
* Probe internal network services (e.g., cloud metadata endpoints like http://169.254.169.254/latest/meta-data/ in AWS).
* Retrieve sensitive data from internal web applications that are not exposed to the public internet.
* Potentially interact with internal APIs if the Trino server has valid credentials or network access to them.
CVSS 4.0 Vector Interpretation:
AV:N: Exploitable over the network.AC:L: Low complexity; no special conditions required.AT:P: Attack Target is the Trino server itself.PR:L: Requires low privileges (any authenticated user).UI:N: No user interaction required.VC:H: High impact on the confidentiality of the Trino server (arbitrary file read).SC:H: High impact on the confidentiality of other systems (SSRF to internal resources).VI:N/VA:N: No impact on integrity or availability.- Fingerprinting: The attacker identifies that the target is running Apache Trino. This can be done by: * Checking the
- Authentication: The attacker obtains valid credentials for a low-privilege Trino user. This could be via: * Default credentials (if not changed). * Credential stuffing or phishing. * Compromised service account credentials. * If the Trino instance is exposed to the internet without authentication (misconfiguration), no credentials are needed, but the CVE specifies
⚡ Attack Chain
1. Discovery & Reconnaissance
X-Powered-By header (if present).
* Accessing the Trino Web UI (typically at /ui or /v1/info) and checking the version string.
* Using Shodan/Censys to search for open ports (default 8080) with Trino-specific HTTP responses.
PR:L, implying authentication is expected.2. Exploitation
The attacker crafts a Trino SQL query that interacts with thetrino-storage plugin. The exact function name and parameter syntax depend on the plugin's implementation, but typically, such plugins expose functions like storage_read(), storage_fetch(), or similar.Illustrative PoC (Note: Exact function names are not specified in the CVE description. The following is a realistic example of how such a plugin might be invoked):
Assume the plugin provides a function storage_read(path) that reads a file and returns its content, and storage_fetch(url) that fetches a URL.
Scenario A: Arbitrary File Read (Path Traversal)
The attacker attempts to read the Trino configuration file or a system file.
SELECT storage_read('../../../../etc/passwd');Or, if the plugin uses a base directory:
SELECT storage_read('/etc/passwd');If the plugin validates against a base directory (e.g., /data/), the attacker uses path traversal:
SELECT storage_read('../../../../etc/passwd');Scenario B: SSRF to Cloud Metadata
The attacker attempts to retrieve AWS instance metadata to obtain IAM credentials.
SELECT storage_fetch('http://169.254.169.254/latest/meta-data/iam/security-credentials/');Scenario C: SSRF to Internal Service
The attacker probes an internal service, e.g., an internal admin panel at http://10.0.0.5/admin.
SELECT storage_fetch('http://10.0.0.5/admin');Curl Example (if the plugin exposes an HTTP endpoint directly, though Trino is SQL-based):
If the plugin also exposes a REST endpoint (less common for Trino plugins, but possible for custom implementations):
curl -X GET "http://trino-server:8080/plugins/storage/read?path=../../../../etc/passwd" \
-H "Authorization: Basic <base64_encoded_credentials>"3. Post-Exploitation
/etc/passwd or application configuration files (e.g., application.properties, config.properties), they may obtain database credentials, API keys, or internal service tokens.🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
1. Upgrade
ebyhr:trino-storage versions through 477.trino-storage plugin where this vulnerability is patched. Check the plugin's GitHub repository or vendor advisory for the specific fixed version.2. Workarounds
trino-storage plugin is not required, disable it in the Trino configuration.plugin directory.
* Remove any references to the plugin in config.properties or catalog configurations.
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and cloud metadata endpoints (169.254.169.254).
* Use a firewall rule to drop outbound traffic from the Trino server to these ranges.3. Detection
../, ..\\, /etc/passwd, /etc/shadow, C:\Windows\.
* SSRF: http://169.254.169.254, http://10., http://172.16., http://192.168., http://127.0.0.1.
{
"query": "SELECT storage_read('../../../../etc/passwd')",
"user": "low_priv_user",
"timestamp": "2026-12-01T12:00:00Z"
}/etc/passwd, configuration files) on the Trino server.⚠️ Urgency
While not in the CISA KEV catalog, the combination of SSRF and Path Traversal in a widely used data platform like Trino poses a significant risk, especially in cloud environments. The low complexity and network accessibility make this a high-priority patch. Organizations should:
1. Immediately assess if they are using the trino-storage plugin.
2. Upgrade to a patched version as soon as possible.
3. Implement network segmentation and SSRF mitigations if an immediate upgrade is not feasible.
4. Review logs for any signs of exploitation.
[🤖 CVE Professor AI Security Engine]
FOFA Query