Severity:

HIGH RISK

(7.3)

Path Traversal in RTGS2017 NagaAgent Skills Endpoint

CVE-2026-7784

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File System 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

A path traversal vulnerability in the Skills endpoint of RTGS2017 NagaAgent up to version 5.1.0 allows untrusted user input from the Name argument to influence filesystem paths.

A remote attacker can craft requests that traverse directories on the server, potentially accessing files outside the intended directory scope and exposing sensitive data or configuration.

Affected context

The vulnerability resides in the Skills endpoint implemented in apiserver/routes/extensions.py of RTGS2017 NagaAgent up to version 5.1.0.

It occurs when the server takes the Name argument from incoming API requests and uses it in filesystem paths without rigorous normalization or restriction to an allowed directory.

Deployments that expose this API endpoint over a network and rely on it to read or manipulate files based on a user-provided name are more likely to be affected.

Exploit preconditions

  • Attack surface: Network-exposed API endpoint for Skills in apiserver/routes/extensions.py.
  • Required access: Ability to send HTTP requests to the affected Skills endpoint (no local filesystem access required).
  • Trigger point: Server-side file operations (read/write/list) that incorporate the Name parameter into a filesystem path.
  • Why exploitation is possible: The application constructs file paths directly using the Name argument without robust validation, normalization, or enforcement of a fixed base directory, allowing ../-style traversal to break out of the intended path.

Why this happens

The core issue aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The Skills endpoint appears to treat the Name parameter as a trusted path fragment and concatenate it into filesystem paths without:

  • Normalizing and validating the resulting path, and
  • Enforcing that the final resolved path remains within an expected directory root.

This pattern allows an attacker to inject directory traversal sequences (e.g., moving up the directory hierarchy) and reach files outside the intended scope, effectively bypassing the application's logical sandbox for file access.

Potential impact

  • Unauthorized reading of files outside the intended directory, which may include configuration files, logs, or other sensitive data.
  • Discovery of system information that could aid in further attacks (e.g., service keys, internal endpoints, or credentials stored on disk).
  • Potential modification or deletion of files if the vulnerable endpoint performs write or delete operations based on the Name argument.
  • Escalation of impact when combined with other vulnerabilities (e.g., reading secrets that enable remote code execution through separate flaws).

General mitigation guidance

Effective mitigation generally focuses on constraining file access and hardening path handling:

  • Resolve all user-supplied path fragments against a fixed, trusted base directory and verify the final canonical path remains under that directory before performing file operations.
  • Reject any input that contains directory traversal markers, absolute paths, or unexpected path separators, and prefer whitelisting allowed filenames or identifiers rather than arbitrary paths.
  • Decouple user-facing identifiers (like "Name") from raw filesystem paths by mapping them to known safe entries or records in a datastore.
  • Run the service with minimal filesystem privileges and restrict OS-level access so that even if a path escape occurs, only a limited set of files is reachable.
  • Centralize and standardize path handling logic within the codebase, using helper functions that enforce consistent validation rules.

How teams detect issues like this

Detection can combine code-focused and runtime-focused approaches:

  • Static analysis: Look for string concatenation of request parameters (such as Name) into filesystem APIs (open, os.path, pathlib, file reads/writes). Flag any usage where user input contributes to paths without normalization and directory checks.
  • Code review: During manual reviews, trace how API parameters flow into file operations. Pay attention to handler functions in apiserver/routes/extensions.py and similar routes that translate user input into pathnames.
  • Security testing: Use dynamic testing or fuzzing to send payloads containing ../, URL-encoded traversal sequences, or absolute paths to the Skills endpoint and monitor for unexpected file responses or error messages that indicate access outside the expected directory.
  • Policy enforcement: Integrate secure coding guidelines and automated checks in CI/CD pipelines that prevent merging of code where user input is directly embedded into filesystem paths.

Sources

SourceLink
github.comgithub.com/RTGS2017/NagaAgent/
github.comgithub.com/RTGS2017/NagaAgent/issues/311
vuldb.comvuldb.com/submit/807744
vuldb.comvuldb.com/vuln/360981
vuldb.comvuldb.com/vuln/360981/cti

Frequently asked

questions

Yes. The weakness is in a network-accessible Skills endpoint; an attacker who can reach that API over the network can attempt to exploit the path traversal via crafted Name parameters.

The attacker needs the ability to send requests to the exposed NagaAgent API. No local shell or filesystem access is required, though access controls or authentication on the endpoint (if present) can limit who can exploit it.

Constrain all file operations to a predefined directory and validate that any path derived from user input, after canonicalization, remains inside that directory. Avoid treating user-controlled values as raw paths; instead, map them to known safe filenames or records and reject anything outside an explicit allowlist.

Establish a secure file-access abstraction layer that handles path normalization and directory enforcement, forbid direct concatenation of user input into paths in coding standards, and use static analysis and code review checklists to detect and block path-handling logic that bypasses these safeguards.

Find out what's already
exploitable in your codebase.