Skip to content

Prompty: Arbitrary file read via file reference expansion

High severity GitHub Reviewed Published Jun 6, 2026 in microsoft/prompty • Updated Jul 17, 2026

Package

npm @prompty/core (npm)

Affected versions

<= 2.0.0-beta.1

Patched versions

2.0.0-beta.2
nuget Prompty.Core (NuGet)
<= 2.0.0-beta.1
2.0.0-beta.2
pip prompty (pip)
<= 2.0.0b1
2.0.0b2
cargo prompty (Rust)
<= 2.0.0-beta.1
2.0.0-beta.2

Description

Summary

Prompty loaders expanded ${file:...} references in .prompty frontmatter without enforcing that the resolved path stayed within an authorized directory. An attacker-controlled prompt file could use path traversal or an absolute path to cause the host application to read files accessible to the process.

Affected packages

  • PyPI prompty versions <= 2.0.0b1; fixed in 2.0.0b2
  • npm @prompty/core versions <= 2.0.0-beta.1; fixed in 2.0.0-beta.2
  • crates.io prompty versions <= 2.0.0-beta.1; fixed in 2.0.0-beta.2
  • NuGet Prompty.Core versions <= 2.0.0-beta.1; fixed in 2.0.0-beta.2

Impact

Applications that load untrusted .prompty files, user-provided prompt paths, or prompt bundles from less-trusted locations could disclose local files available to the application process when expanded values are logged, returned, or otherwise exposed.

Remediation

Upgrade to the fixed runtime version for your ecosystem. The fix makes file references secure by default: ${file:...} may only resolve within the directory tree containing the .prompty file. Host applications that need shared prompt assets outside that tree must explicitly provide allowed file roots through runtime load options. Absolute paths, .. traversal, and symlink escapes outside allowed roots are rejected.

Fix details

The patched runtimes canonicalize file-reference targets and allowed roots before reading referenced files, reject targets outside the prompt directory by default, and add regression coverage for traversal, absolute paths, explicit allowlists, and symlink escapes. The release commit is 88ac9948d7d37995edbb2f6d36913436626c39e1.

References

@sethjuarez sethjuarez published to microsoft/prompty Jun 6, 2026
Published by the National Vulnerability Database Jul 16, 2026
Published to the GitHub Advisory Database Jul 17, 2026
Reviewed Jul 17, 2026
Last updated Jul 17, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(61st percentile)

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Learn more on MITRE.

CVE ID

CVE-2026-53598

GHSA ID

GHSA-wxhm-2mq7-7697

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.