CVE Professor
/
All CVEs
CVE-2026-141540

CVE-2026-141540 — Ebyhr Trino-storage (477) — CWE-73

HIGH CVSS 7 CVE.org

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

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. Present AT:P
Privileges Req. Low PR:L
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity None VI:N
Vuln. Avail. None VA:N
Subseq. Conf. High SC:H
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
AI Security Analysis & Remediation

🎯 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.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies that the target is running Apache Trino. This can be done by:
  • * Checking the 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.
  • 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 PR:L, implying authentication is expected.

    2. Exploitation

    The attacker crafts a Trino SQL query that interacts with the trino-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

  • Credential Theft: If the attacker reads /etc/passwd or application configuration files (e.g., application.properties, config.properties), they may obtain database credentials, API keys, or internal service tokens.
  • Cloud Compromise: If SSRF to cloud metadata is successful, the attacker can retrieve temporary IAM credentials. These can be used to:
  • * Access S3 buckets. * Spin up new EC2 instances. * Access other AWS services.
  • Lateral Movement: Using retrieved credentials, the attacker can move laterally to other internal systems.
  • Data Exfiltration: The attacker can read sensitive data files stored on the Trino server or accessible via internal URLs.
  • 🌍 Real World Impact

  • Confidentiality (High):
  • * Trino Server: Arbitrary file read allows access to configuration files, logs, and potentially sensitive data stored on the server. * Internal Network: SSRF allows access to internal services that are not exposed to the internet. This includes cloud metadata endpoints, internal admin panels, and other microservices.
  • Integrity (None): The vulnerability does not allow modification of data or system state.
  • Availability (None): The vulnerability does not allow denial of service.
  • Practical Consequences:

  • Cloud Environments: High risk of cloud account compromise via metadata SSRF.

  • On-Premise: Risk of credential theft and lateral movement within the internal network.

  • Data Breach: Sensitive data stored in files or accessible via internal URLs can be exfiltrated.
  • 🛡️ Remediation & Mitigation

    1. Upgrade

  • Affected Versions: ebyhr:trino-storage versions through 477.
  • Recommendation: Upgrade to the latest version of the trino-storage plugin where this vulnerability is patched. Check the plugin's GitHub repository or vendor advisory for the specific fixed version.
  • 2. Workarounds

  • Disable the Plugin: If the trino-storage plugin is not required, disable it in the Trino configuration.
  • * Remove the plugin from the plugin directory. * Remove any references to the plugin in config.properties or catalog configurations.
  • Network Segmentation:
  • * Restrict network access to the Trino server. Ensure it is not directly exposed to the internet. * Use a reverse proxy with strict authentication and IP allowlisting.
  • SSRF Mitigation:
  • * If the plugin cannot be upgraded, implement a network-level block for requests from the Trino server to internal IP ranges (e.g., 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

  • Web Server Logs: Look for SQL queries containing suspicious paths or URLs.
  • * Path Traversal: ../, ..\\, /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.
  • Example Log Pattern (Trino Query Log):
  • {
          "query": "SELECT storage_read('../../../../etc/passwd')",
          "user": "low_priv_user",
          "timestamp": "2026-12-01T12:00:00Z"
        }
  • Network Traffic: Monitor outbound traffic from the Trino server for requests to internal IPs or cloud metadata endpoints.
  • File Access Logs: Monitor access to sensitive files (e.g., /etc/passwd, configuration files) on the Trino server.
  • ⚠️ Urgency

  • CVSS Score: 7.0 (HIGH)
  • CISA KEV: No
  • Exploit Complexity: Low
  • Authentication Required: Yes (Low Privilege)
Patching Priority: High

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]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="ebyhr trino-storage"
CVSS Score
7 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-73
Affected Products (1)
ebyhr:trino-storage (477)
References & Advisories (1)
Related CVEs
8.7
CVE-2026-144965
Docutils before 0.23.1 contains a local file disclosure vulnerability in the HTML and ODT writers that embed i
8.6
CVE-2026-135760
External control of a file path in Revenera FlexNet Publisher lmadmin versions 11.19.10 and prior allows a re
6.1
CVE-2026-130017
When a table is dropped with purge, and when old metadata files are deleted after a commit (write.metadata.del
6.0
CVE-2026-144666
AsyncSSH before 2.24.2 contains an arbitrary file write vulnerability in the SCP client that allows malicious
4.8
CVE-2026-115940
Potential local privilege escalation vulnerabilities have been identified in the Fortemedia APO Control Servic
0.0
CVE-2026-142413
Incorrect Permission Assignment for Critical Resource vulnerability in Drupal Database Export UI allows Exploi
8.8
CVE-2026-47798
The eauth token directory was created world-listable (mode 0755). Each token file is named with the bearer tok