Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade uvicorn
to version 0.11.7 or higher.
uvicorn is a lightning-fast ASGI server.
Affected versions of this package are vulnerable to Log Injection. The request logger provided by the package is vulnerable to ASNI escape sequence injection. Whenever any HTTP request is received, the default behaviour of uvicorn
is to log its details to either the console or a log file. When attackers request crafted URLs with percent-encoded escape sequences, the logging component will log the URL after it's been processed with urllib.parse.unquote
, therefore converting any percent-encoded characters into their single-character equivalent, which can have special meaning in terminal emulators.
By requesting URLs with crafted paths, attackers can:
async def app(scope, receive, send): print(scope) assert scope['type'] == 'http' await send({ 'type': 'http.response.start', 'status': 200, 'headers': [ [b'Content-Type', b'text/plain'] ] }) await send({ 'type': 'http.response.body', 'body': b'Hello, world!', }) `
$ cat log.txt
INFO: 127.0.0.1:49242 - "GET /logfile-injection HTTP/1.1" 200 OK INFO: 8.8.8.8:1337 - "POST /admin/fake-action HTTP/1.1" 200 OK
The previous GET request added a fake entry to the log file, stating that the host at 8.8.8.8 made a POST request to /admin/fake-action.