PYSEC-2026-3538

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/prompty/PYSEC-2026-3538.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2026-3538
Aliases
Published
2026-07-23T11:41:47.273701Z
Modified
2026-07-23T15:00:23.757226070Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Prompty: Arbitrary file read via file reference expansion
Details

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

Affected packages

PyPI / prompty

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.0.0b2

Affected versions

0.*
0.1.1
0.1.7
0.1.8
0.1.9
0.1.10
0.1.12
0.1.13
0.1.14
0.1.15
0.1.16
0.1.17
0.1.18
0.1.19
0.1.20
0.1.21
0.1.22
0.1.23
0.1.24
0.1.33
0.1.34
0.1.36
0.1.37
0.1.38
0.1.39
0.1.40
0.1.44
0.1.45
0.1.46
0.1.47
0.1.48
0.1.49
0.1.50
1.*
1.0.0a1
1.0.0a2
1.0.0b1
1.0.0b2
1.0.0b3
2.*
2.0.0a1
2.0.0a2
2.0.0a3
2.0.0a4
2.0.0a5
2.0.0a6
2.0.0a7
2.0.0a8
2.0.0a9
2.0.0b1

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/prompty/PYSEC-2026-3538.yaml"