Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Fix for 13 vulnerabilities #850

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

madchap
Copy link
Owner

@madchap madchap commented Jan 30, 2024

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • requirements.txt
⚠️ Warning
celery 5.3.0 requires kombu, which is not installed.

Vulnerabilities that will be fixed

By pinning:
Severity Priority Score (*) Issue Upgrade Breaking Change Exploit Maturity
medium severity 539/1000
Why? Has a fix available, CVSS 6.5
Denial of Service (DoS)
SNYK-PYTHON-CRYPTOGRAPHY-5914629
cryptography:
41.0.3 -> 42.0.0
No No Known Exploit
medium severity 479/1000
Why? Has a fix available, CVSS 5.3
Missing Cryptographic Step
SNYK-PYTHON-CRYPTOGRAPHY-6036192
cryptography:
41.0.3 -> 42.0.0
No No Known Exploit
medium severity 479/1000
Why? Has a fix available, CVSS 5.3
Denial of Service (DoS)
SNYK-PYTHON-CRYPTOGRAPHY-6050294
cryptography:
41.0.3 -> 42.0.0
No No Known Exploit
medium severity 616/1000
Why? Proof of Concept exploit, Has a fix available, CVSS 5.9
NULL Pointer Dereference
SNYK-PYTHON-CRYPTOGRAPHY-6092044
cryptography:
41.0.3 -> 42.0.0
No Proof of Concept
medium severity 616/1000
Why? Proof of Concept exploit, Has a fix available, CVSS 5.9
Information Exposure
SNYK-PYTHON-CRYPTOGRAPHY-6126975
cryptography:
41.0.3 -> 42.0.0
No Proof of Concept
high severity 711/1000
Why? Proof of Concept exploit, Has a fix available, CVSS 7.8
Untrusted Search Path
SNYK-PYTHON-GITPYTHON-5871282
gitpython:
3.1.32 -> 3.1.41
No Proof of Concept
medium severity 586/1000
Why? Proof of Concept exploit, Has a fix available, CVSS 5.3
Directory Traversal
SNYK-PYTHON-GITPYTHON-5876644
gitpython:
3.1.32 -> 3.1.41
No Proof of Concept
high severity 783/1000
Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 7.8
Untrusted Search Path
SNYK-PYTHON-GITPYTHON-6150683
gitpython:
3.1.32 -> 3.1.41
No Proof of Concept
critical severity 909/1000
Why? Mature exploit, Has a fix available, CVSS 9.6
Heap-based Buffer Overflow
SNYK-PYTHON-PILLOW-5918878
pillow:
9.5.0 -> 10.2.0
No Mature
high severity 589/1000
Why? Has a fix available, CVSS 7.5
Uncontrolled Resource Consumption ('Resource Exhaustion')
SNYK-PYTHON-PILLOW-6043904
pillow:
9.5.0 -> 10.2.0
No No Known Exploit
high severity 798/1000
Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 8.1
Eval Injection
SNYK-PYTHON-PILLOW-6182918
pillow:
9.5.0 -> 10.2.0
No Proof of Concept
medium severity 509/1000
Why? Has a fix available, CVSS 5.9
Information Exposure Through Sent Data
SNYK-PYTHON-URLLIB3-5926907
urllib3:
1.26.11 -> 1.26.18
No No Known Exploit
medium severity 424/1000
Why? Has a fix available, CVSS 4.2
Information Exposure Through Sent Data
SNYK-PYTHON-URLLIB3-6002459
urllib3:
1.26.11 -> 1.26.18
No No Known Exploit

(*) Note that the real score may have changed since the PR was raised.

Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

Check the changes in this PR to ensure they won't cause issues with your project.


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report

🛠 Adjust project settings

📚 Read more about Snyk's upgrade and patch logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Denial of Service (DoS)
🦉 NULL Pointer Dereference
🦉 Directory Traversal
🦉 More lessons are available in Snyk Learn

Copy link

Unrestricted File Download

Play SecureFlag Play Labs on this vulnerability with SecureFlag!

Description

Unrestricted File Downloads are a type of vulnerability that allow a malicious actor to download internal files, resulting in the potential, unintentional exposure of sensitive files, such as the configuration file, which contains credentials for the database. In milder forms, Unrestricted File Download attacks allow access to a specific directory subtree but could still enable cross-user breaches or access to crucial configuration and sensitive files.

Read more

Impact

The damage an attacker can cause by employing this type of attack is really only limited by the value of the exposed information. If a developer has structured their web root folder to include sensitive configuration files, for example, the fallout will, of course, be highly damaging. Furthermore, as with many other attacks that are a part of the attacker's toolkit, the vulnerability can be used by an attacker as a stepping stone, leading to the full compromise of the system.

Scenarios

A classic scenario is a web application that dynamically fetches resources according to a query parameter; and the available resources are stored in a particular directory within the file systems. For example, the following URL fetches the /opt/wwwdata/assets/some-file file and uses it to build the web page, possibly returning it verbatim:

http://www.vulnerableapp.com/?pageId=some-file

The Directory Traversal technique is commonly used to exploit this type of vulnerability in file systems; the nickname "dot-dot-slash" is often used as an alternative label given the punctuated order of symbols (../ and ..\) that allow access to unintended resources of the server's file system.

If no checks or sanitisation are in place, it is possible to traverse the resources directory and target any file on the file system. For example, the following fetches the sensitive /etc/passwd file on Linux and other unix-derived systems:

http://www.vulnerableapp.com/?pageId=../../../../../etc/passwd

Prevention

If possible, developers should avoid building file path strings with user-provided input. Many functions of an application can be rewritten to deliver functionally identical behavior but in a safer manner.

If passing user-supplied input to a filesystem API is absolutely necessary, developers must ensure the following:

  • Validate the user input by strictly accepting well-known, reputable candidates against an allow list
  • If validating against an allow list isn't possible, validation should at least ensure that only permitted content is contained in the input

As defense in depth, developers should never run a server component with root or SYSTEM privileges, as this can enable access to any file or folder, including crypto keys and the registry, to a malicious actor exploiting this vulnerability. Server components should be run using a less-privileged user with no access to critical system files.

Testing

Verify that user-submitted filename metadata is not used directly by system or framework filesystems and that a URL API is used to protect against path traversal.

View this in the SecureFlag Knowledge Base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants