{"id":"PYSEC-2026-3538","summary":"Prompty: Arbitrary file read via file reference expansion","details":"## Summary\nPrompty 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.\n\n## Affected packages\n- PyPI `prompty` versions `\u003c= 2.0.0b1`; fixed in `2.0.0b2`\n- npm `@prompty/core` versions `\u003c= 2.0.0-beta.1`; fixed in `2.0.0-beta.2`\n- crates.io `prompty` versions `\u003c= 2.0.0-beta.1`; fixed in `2.0.0-beta.2`\n- NuGet `Prompty.Core` versions `\u003c= 2.0.0-beta.1`; fixed in `2.0.0-beta.2`\n\n## Impact\nApplications 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.\n\n## Remediation\nUpgrade 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.\n\n## Fix details\nThe 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`.","aliases":["CVE-2026-53598","GHSA-wxhm-2mq7-7697"],"modified":"2026-07-23T15:00:23.757226070Z","published":"2026-07-23T11:41:47.273701Z","references":[{"type":"WEB","url":"https://github.com/microsoft/prompty/security/advisories/GHSA-wxhm-2mq7-7697"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53598"},{"type":"WEB","url":"https://github.com/microsoft/prompty/commit/88ac9948d7d37995edbb2f6d36913436626c39e1"},{"type":"PACKAGE","url":"https://github.com/microsoft/prompty"},{"type":"PACKAGE","url":"https://pypi.org/project/prompty"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-wxhm-2mq7-7697"}],"affected":[{"package":{"name":"prompty","ecosystem":"PyPI","purl":"pkg:pypi/prompty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0b2"}]}],"versions":["0.1.1","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","0.1.7","0.1.8","0.1.9","1.0.0a1","1.0.0a2","1.0.0b1","1.0.0b2","1.0.0b3","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"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}