# Librsvg XInclude Arbitrary file reading (CVE-2023-38633) [中文版本(Chinese version)](README.zh-cn.md) Librsvg is a free software SVG rendering library written as part of the GNOME project, intended to be lightweight and portable. A directory traversal problem in the URL decoder of librsvg before 2.56.3 could be used by local or remote attackers to disclose files (on the local filesystem outside of the expected area), as demonstrated by `href=".?../../../../../../../../../../etc/passwd` in an xi:include element. References: - - ## Vulnerable Environment Executing following command to start a PHP server that uses librsvg 2.50.7 to handle SVG images: ``` docker compose up -d ``` After the server is started, browse `http://your-ip:8080` to see the upload page. ## Exploit Use `` to read the local file by this POC: ```xml file not found ``` Upload this SVG image to server, you will see the `/etc/passwd` that is embedded in the output image: ![](1.png)