<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-29T21:41:06.058650+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2023-29159</id>
    <title>CVE-2023-29159</title>
    <updated>2026-09-29T21:41:06.741420+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Encode Starlette</p>
<p>Directory traversal vulnerability in Starlette versions 0.13.5 and later and prior to 0.27.0 allows a remote unauthenticated attacker to view files in a web service which was built using Starlette.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2023-29159"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-v5gw-mw7f-84px</id>
    <title>GHSA-v5gw-mw7f-84px — Starlette has Path Traversal vulnerability in StaticFiles</title>
    <updated>2026-09-29T21:41:06.741544+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: starlette</p>
<p>### Summary
When using `StaticFiles`, if there's a file or directory that starts with the same name as the `StaticFiles` directory, that file or directory is also exposed via `StaticFiles` which is a path traversal vulnerability.</p>
<p>### Details
The root cause of this issue is the usage of `os.path.commonprefix()`:
https://github.com/encode/starlette/blob/4bab981d9e870f6cee1bd4cd59b87ddaf355b2dc/starlette/staticfiles.py#L172-L174</p>
<p>As stated in the Python documentation (https://docs.python.org/3/library/os.path.html#os.path.commonprefix) this function returns the longest prefix common to paths.</p>
<p>When passing a path like `/static/../static1.txt`, `os.path.commonprefix([full_path, directory])` returns `./static` which is the common part of `./static1.txt` and `./static`, It refers to `/static/../static1.txt` because it is considered in the staticfiles directory. As a result, it becomes possible to view files that should not be open to the public.</p>
<p>The solution is to use `os.path.commonpath` as the Python documentation explains that `os.path.commonprefix` works a character at a time, it does not treat the arguments as paths.</p>
<p>### PoC
In order to reproduce the issue, you need to create the following structure:</p>
<p>```
├── static
│   ├── index.html
├── static_disallow
│   ├── index.html
└── static1.txt
```</p>
<p>And run the `Starlette` app with:</p>
<p>```py
import uvicorn
from starlette.applications import Starlette
from starlette.routing import Mount
from starlette.staticfiles import StaticFiles…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-v5gw-mw7f-84px"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/pysec-2023-83</id>
    <title>PYSEC-2023-83</title>
    <updated>2026-09-29T21:41:06.741656+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: starlette</p>
<p>Directory traversal vulnerability in Starlette versions 0.13.5 and later and prior to 0.27.0 allows a remote unauthenticated attacker to view files in a web service which was built using Starlette.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/pysec-2023-83"/>
  </entry>
</feed>
