CVE-2022-31579

The ralphjzhang/iasset repository through 2022-05-04 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely

published July 11, 2022

CVSS
—
EPSS
1%
Percentile
69.5
In the wild
Unconfirmed
What it is

⚠️ A little oversight in path handling could let a crafty attacker access files they shouldn't! The Flask `send_file` function is being used in a way that opens the door to absolute path traversal. 🔥 Think of it like a delivery driver who doesn’t check the address properly and ends up delivering packages to all the wrong houses — any file on the server could be at risk! If exploited, an attacker could access sensitive files stored on the server, potentially leading to data leaks or unauthorized access to critical information. This could have devastating consequences, especially if the exposed files contain credentials or sensitive configurations.

Put simply

Think of it like a delivery driver who doesn’t check the address properly and ends up delivering packages to all the wrong houses — any file on the server could be at risk! The vulnerability arises because the Flask `send_file` function allows users to specify file paths without appropriate validation, leading to possible access to files outside the intended directory.

What to do

If exploited, an attacker could access sensitive files stored on the server, potentially leading to data leaks or unauthorized access to critical information. This could have devastating consequences, especially if the exposed files contain credentials or sensitive configurations. To mitigate this vulnerability, ensure that file path inputs are properly sanitized and validated. Consider restricting file access to a predefined whitelist of directories, and make sure to update to the latest version of the Flask library that addresses this issue. You’ve got this! By taking these steps, you’ll enhance your application's security and keep those digital baddies at bay! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01265 · 69.5th percentile
Published
2022-07-11T01:01Z
EPSS history
Timeline
  • 11 JUL 01:01Z
    The ralphjzhang/iasset repository through 2022-05-04 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely
    cvelistv5