CVE-2026-19326 Overview
CVE-2026-19326 is a path traversal vulnerability [CWE-22] in Jevon-Zhong Ai-doctor version 0.0.1. The flaw affects the deleteImage function in ai-doctor-server/src/filemanagement/filemanagement.service.ts. Attackers can manipulate the imagePath argument to reference files outside the intended directory. Exploitation requires local access and low-privileged authentication. The project maintainer received an issue report but has not responded at the time of publication. The vulnerability is tracked in the VulDB database and referenced in the project's public GitHub repository.
Critical Impact
A local, authenticated attacker can traverse directories using crafted imagePath input to delete arbitrary files accessible to the Ai-doctor server process.
Affected Products
- Jevon-Zhong Ai-doctor 0.0.1
- Component: ai-doctor-server/src/filemanagement/filemanagement.service.ts
- Function: deleteImage
Discovery Timeline
- 2026-08-09 - CVE-2026-19326 published to NVD
- 2026-08-12 - Last updated in NVD database
Technical Details for CVE-2026-19326
Vulnerability Analysis
The vulnerability resides in the deleteImage function of the file management service in Ai-doctor's backend. The function accepts an imagePath parameter from a caller and uses it in a file deletion operation without sufficient normalization or validation. Because the input is not constrained to a safe base directory, an attacker can supply traversal sequences such as ../ to reference paths outside the intended image storage location.
The issue is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). Exploitation requires local access and existing low-level privileges. Successful exploitation yields limited integrity and availability impact by allowing deletion of files reachable by the Node.js process running the Ai-doctor server.
Root Cause
The root cause is missing input sanitization in the deleteImage handler. User-controlled imagePath values are concatenated or resolved against a base path without enforcing that the resolved absolute path remains within the designated image storage directory. TypeScript and Node.js file APIs do not perform path containment checks by default, so upstream validation is required.
Attack Vector
An authenticated local user invokes the deleteImage endpoint or method with a crafted imagePath value containing directory traversal sequences. The server resolves the path and calls the underlying filesystem delete routine against a location outside the intended directory. Since the attack must be initiated from a local position, remote exploitation over an unauthenticated network path is not applicable.
No verified public exploit code has been released. The vulnerability was disclosed through a GitHub Issue Tracker filing referenced in the VulDB Vulnerability Report.
Detection Methods for CVE-2026-19326
Indicators of Compromise
- File deletion events targeting paths outside the Ai-doctor image storage directory initiated by the Ai-doctor server process
- Application logs containing imagePath values with ../, ..\, or URL-encoded traversal sequences such as %2e%2e%2f
- Unexpected removal of configuration files, uploads, or system artifacts belonging to the Node.js runtime user
Detection Strategies
- Instrument the deleteImage code path to log the raw imagePath input and the resolved absolute path prior to deletion
- Use filesystem auditing (auditd, Sysmon FileDelete events) on hosts running the Ai-doctor server to correlate unlink syscalls with the server PID
- Alert on any file deletion by the Ai-doctor process outside its configured storage directory
Monitoring Recommendations
- Forward application and OS-level filesystem events to a centralized log platform for correlation with authentication events
- Baseline the normal set of files touched by the Ai-doctor server, then alert on deviations
- Retain access logs of authenticated sessions that invoke file management endpoints for at least 30 days
How to Mitigate CVE-2026-19326
Immediate Actions Required
- Restrict local access to hosts running Ai-doctor 0.0.1 to trusted administrators only
- Run the Ai-doctor server as a low-privilege user with filesystem permissions limited to its own image directory
- Audit existing image storage directories and adjacent paths for signs of unauthorized deletion
Patch Information
No vendor patch is available. The GitHub PoC Repository maintainer has not responded to the reported GitHub Issue Tracker entry. Until a fix is published, apply the workarounds below and monitor the upstream repository for updates.
Workarounds
- Modify deleteImage to call path.resolve on the concatenated path and reject the request if the result does not start with the configured base directory
- Reject any imagePath input that contains .., absolute path prefixes, or NULL bytes before invoking filesystem APIs
- Enforce a strict allowlist of filenames matching the expected image naming convention using a regular expression
- Consider taking the file management endpoint offline until the upstream project responds with a fix
# Example server-side validation to enforce base-directory containment
# (pseudocode; adapt to your project structure)
BASE_DIR="/var/lib/ai-doctor/images"
RESOLVED=$(realpath -m "$BASE_DIR/$IMAGE_PATH")
case "$RESOLVED" in
"$BASE_DIR"/*) rm -- "$RESOLVED" ;;
*) echo "rejected: path traversal attempt" >&2; exit 1 ;;
esac
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

