/

CVE-2026-19009

Severity:

HIGH RISK

(7.3)

File Inclusion (CWE-73) in TinyAGI Message API Endpoint

CVE-2026-19009

Deferred

Vulnerability type

Category:

File Inclusion

CWE:

CWE-73

Impact:

Unauthorized File Access

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

TinyAGI 0.0.20 contains a file inclusion weakness in the collectFiles function used by its Message API Endpoint. A remote attacker may influence file selection or inclusion through the exposed API, potentially accessing unintended files when the endpoint processes attacker-controlled input.

Affected context

The issue occurs in TinyAGI 0.0.20 within packages/core/src/response.ts, where the collectFiles function handles files for the Message API Endpoint. Risk depends on the endpoint being reachable by an attacker and on externally influenced file names or paths being used without sufficiently restricting them to an intended directory or resource set.

Exploit preconditions

  • Attack surface: Network-reachable Message API Endpoint
  • Required access: Ability to send requests accepted by the endpoint; authentication requirements are deployment-dependent
  • Trigger point: File collection or response processing through the collectFiles function
  • Why exploitation is possible: Attacker-influenced file references may be used to select files outside the endpoint's intended resource boundary

Why this happens

The underlying weakness is improper control of externally influenced file names or paths. When application logic uses request-derived values to locate or include files without strict allowlisting, canonicalization, and boundary enforcement, an attacker may cause access to unintended filesystem resources.

This behavior maps to CWE-73: External Control of File Name or Path, which covers cases where external input controls a file name or path used by the application.

Potential impact

  • An attacker may read unintended files available to the service process
  • Sensitive configuration, application, or environment data could be exposed
  • File contents could be returned through API responses
  • The service could experience information disclosure or follow-on compromise
  • Shared-host or container data may be exposed if filesystem permissions allow it

General mitigation guidance

Mitigation generally focuses on removing direct trust in client-supplied file paths and enforcing a narrow resource boundary.

Common defensive patterns include:

  • Resolve requested resources from server-side identifiers rather than arbitrary paths
  • Apply strict allowlists for permitted files and extensions
  • Canonicalize paths and verify that resolved paths remain within an approved directory
  • Reject traversal markers, absolute paths, symbolic-link escapes, and unexpected path formats
  • Prefer secure-by-default APIs that select from predefined resources
  • Run the service with least-privilege filesystem permissions
  • Avoid returning raw filesystem errors or contents that reveal sensitive details

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that trace request parameters into file-system APIs
  • Code review checks for path concatenation, file inclusion, and missing canonicalization
  • Tests covering traversal attempts, absolute paths, symbolic links, and unauthorized extensions
  • Runtime monitoring for unusual file access by the service process
  • Policy enforcement requiring allowlisted resource identifiers for API-driven file access

Automated security review tools may help identify externally controlled path flows, but findings should be validated against deployment-specific filesystem permissions and routing behavior.

Sources

SourceLink
github.comgithub.com/TinyAGI/tinyagi/
github.comgithub.com/TinyAGI/tinyagi/issues/282
vuldb.comvuldb.com/cve/CVE-2026-19009
vuldb.comvuldb.com/submit/862672
vuldb.comvuldb.com/vuln/386402
vuldb.comvuldb.com/vuln/386402/cti

Frequently asked

questions

The issue is described as remotely triggerable because it is reachable through the Message API Endpoint. Practical exploitability depends on network exposure, authentication, authorization, and the files accessible to the service.

An attacker needs the ability to submit requests that reach the affected file-collection behavior. Whether authentication is required depends on the application's deployment and access controls.

Do not use client-controlled paths directly. Select resources through server-side identifiers or strict allowlists, then enforce canonical path boundaries before any file operation.

Combine secure-by-default file APIs, path canonicalization, traversal-focused testing, least-privilege filesystem permissions, and code-review policies that trace external input into file operations.

Find out what's already
exploitable in your codebase.