Intel

AIKIDO-2026-387556

rich-rst is vulnerable to Path Traversal

Path TraversalGHSA-qf6c-j2qx-p22r Published 2 days ago

75

High Risk

This Affects:

PYTHONrich-rst
0.0.1 - 2.1.0
Fixed in 2.2.0
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.

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.

Background info

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

How to fix this

Upgrade the rich-rst library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform