CVE-2022-31521

The Niyaz-Mohamed/mosaic repository through 1.0.0 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely

published July 11, 2022

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

⚠️ Watch out for a sneaky absolute path traversal! The Niyaz-Mohamed/mosaic repository lets attackers access files they shouldn't — it’s like giving a delivery driver the wrong address and watching them wander into someone else’s house! Imagine a restaurant that has a secret menu, but the waiter keeps handing out the entire kitchen recipe book instead of just the items on the menu. This vulnerability allows attackers to access files on the server that should remain hidden, potentially exposing sensitive information. An attacker could exploit this flaw to read any file on the server, which means sensitive data could fall into the wrong hands. This could lead to unauthorized information disclosure and could seriously compromise your application’s security.

Put simply

Imagine a restaurant that has a secret menu, but the waiter keeps handing out the entire kitchen recipe book instead of just the items on the menu. This vulnerability allows attackers to access files on the server that should remain hidden, potentially exposing sensitive information. This vulnerability arises from the unsafe use of Flask's send_file function, which lacks proper validation of file paths, allowing malicious users to traverse directories and access unauthorized files.

What to do

An attacker could exploit this flaw to read any file on the server, which means sensitive data could fall into the wrong hands. This could lead to unauthorized information disclosure and could seriously compromise your application’s security. To remediate this issue, ensure that all file paths are properly validated and sanitized before they're processed. Consider upgrading to a fixed version if available, and implement additional security measures like restricting access to sensitive files. This is fixable! Follow these steps, and you'll have your application secure in no time! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01337 · 71.0th percentile
Published
2022-07-11T00:55Z
EPSS history
Timeline
  • 11 JUL 00:55Z
    The Niyaz-Mohamed/mosaic repository through 1.0.0 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely
    cvelistv5