/

CVE-2026-75333

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in yx-image-recognition v1.0

CVE-2026-75333

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Access

Severity:

HIGH RISK

(7.5)

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

yx-image-recognition v1.0 contains a path traversal vulnerability because values such as dir and filePath are used in filesystem operations without sufficient path sanitization or allowlist validation. An attacker who can control these parameters may access files outside the intended directory or cause unintended filesystem operations.

Affected context

The vulnerability occurs where the application accepts user-controlled directory or file path parameters and passes them directly to filesystem APIs such as new File(). Risk depends on whether an attacker can reach the affected functionality, influence dir or filePath, and whether the application process has permissions to access files beyond the intended storage location.

Exploit preconditions

  • Attack surface: Application functionality that accepts directory or file path input
  • Required access: Ability to submit or influence the relevant dir or filePath parameters
  • Trigger point: Filesystem operations that resolve attacker-controlled paths
  • Why exploitation is possible: The supplied paths are used without reliable canonicalization, containment checks, or allowlist validation

Why this happens

The underlying issue is a failure to treat filesystem paths as security-sensitive input. Directly constructing file objects from untrusted values without normalizing the path and verifying that it remains within an approved base directory maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • An attacker may read sensitive files outside the intended application directory
  • Application configuration, credentials, or source code could be exposed
  • Unauthorized file existence or metadata checks could be performed
  • Files may be overwritten, created, or otherwise manipulated if write operations are reachable
  • The application could suffer data exposure or follow-on compromise

General mitigation guidance

Mitigation generally focuses on reducing trust in path input and enforcing filesystem boundaries.

Common defensive patterns include:

  • Resolve paths against a fixed, trusted base directory and verify containment after canonicalization
  • Prefer server-side identifiers mapped to approved files instead of accepting arbitrary paths
  • Enforce strict allowlists for permitted filenames, extensions, and directories
  • Reject traversal sequences, absolute paths, symbolic-link escapes, and ambiguous path forms
  • Apply least-privilege filesystem permissions to the application process
  • Use read-only storage and isolated work directories where feasible
  • Keep validation close to the filesystem operation so all call paths receive the same protection

How teams detect issues like this

Organizations can identify path traversal risks through:

  • Static analysis rules for filesystem APIs receiving request-derived or configuration-derived path values
  • Code review checks for direct use of dir, filePath, or similar inputs in file constructors and read/write operations
  • Tests that verify canonicalized paths remain within approved directories
  • Runtime monitoring for access attempts involving unexpected parent-directory segments, absolute paths, or sensitive locations
  • Policy enforcement requiring centralized path-validation utilities for filesystem access
  • Automated security review tools that flag untrusted data flowing into file APIs

Sources

SourceLink
github.comgithub.com/fangtang7/CVE/blob/main/yx-image-recognition/PATH_TRAVERSAL_REPORT.md

Frequently asked

questions

It may be remotely exploitable when the affected functionality is exposed through an application interface and an attacker can control the relevant path parameters. Exploitability depends on deployment and access controls.

The attacker generally needs access to a reachable operation that accepts or derives the dir or filePath values. Authentication requirements depend on how that operation is exposed.

Use trusted server-side file identifiers where possible. Otherwise, canonicalize the requested path, enforce containment within an approved base directory, and apply strict allowlist validation before performing filesystem operations.

Centralize path handling, use least-privilege filesystem permissions, add traversal-focused tests, and enforce code review or automated policies that prevent untrusted input from reaching file APIs without validation.

Find out what's already
exploitable in your codebase.