Intel

AIKIDO-2026-387556

rich-rst is vulnerable to Path Traversal

GHSA-qf6c-j2qx-p22rPublished Oct 5, 2026
October 5, 2026

75

CVE Score

High

Path Traversal

Are you affected? Scan for Free

TL;DR

The .. literalinclude:: directive in rich-rst reads the file path given in its argument without checking that the path stays inside the source document's directory. Absolute paths and ../ parent directory segments both resolve, so rendering reStructuredText from an untrusted source discloses any file the rendering process can read, such as /etc/passwd. The fix disables directives that read other files by default and, when re-enabled through allow_file_access, resolves symlinks and rejects paths outside the source directory.

How do I fix this?

Upgrade the rich-rst library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you render reStructuredText markup from an untrusted source.

Package

Versions

0.0.1 - 2.1.0

Fixed in 2.2.0

Background info

rich-rst is vulnerable to Path Traversal in versions 0.0.1 - 2.1.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea