Conversation
| requests>=2.18 | ||
|
|
||
| # progress bars in data cleaning scripts | ||
| tqdm>=4.19 |
There was a problem hiding this comment.
tqdm 4.19 / requirements.txt
Total vulnerabilities: 1
| Critical: 0 | High: 0 | Medium: 0 | Low: 1 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2024-34062 | 3.9 | 4.66.3 |
Open |
| matplotlib==2.2.3 | ||
|
|
||
| # Used for downloading datasets over HTTP | ||
| requests>=2.18 |
There was a problem hiding this comment.
requests 2.18 / requirements.txt
Total vulnerabilities: 3
| Critical: 0 | High: 1 | Medium: 2 | Low: 0 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2018-18074 | 7.5 | 2.20.0 |
Open | |
| CVE-2023-32681 | 6.1 | 2.31.0 |
Open | |
| CVE-2024-35195 | 5.6 | 2.32.0 |
Open |
| lightning==2.2.1 | ||
| tensorflow-cpu==2.10.0 | ||
| tensorflow-gpu==2.10.0 | ||
| langchain==0.0.350 |
There was a problem hiding this comment.
langchain 0.0.350 / requirements.txt
Total vulnerabilities: 4
| Critical: 0 | High: 0 | Medium: 2 | Low: 2 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2024-2965 | 4.2 | 0.2.5 |
Open | |
| CVE-2024-3571 | 6.5 | 0.0.353 |
Open | |
| CVE-2024-8309 | 4.9 | 0.2.0 |
Open | |
| CVE-2024-0243 | 3.7 | 0.1.0 |
Open |
|
|
||
| lightning==2.2.1 | ||
| tensorflow-cpu==2.10.0 | ||
| tensorflow-gpu==2.10.0 |
There was a problem hiding this comment.
tensorflow-gpu 2.10.0 / requirements.txt
Total vulnerabilities: 48
| Critical: 6 | High: 39 | Medium: 1 | Low: 2 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2022-41880 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41900 | 9.8 | 2.10.1 |
Open | |
| CVE-2022-41902 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41910 | 9.1 | 2.10.1 |
Open | |
| CVE-2023-25664 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-25668 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-33976 | 7.5 | 2.13.0 |
Open | |
| CVE-2022-41883 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41884 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41886 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41887 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41888 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41889 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41890 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41891 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41893 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41894 | 8.1 | 2.10.1 |
Open | |
| CVE-2022-41895 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41896 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41897 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41898 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41899 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41901 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41907 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41908 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41909 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41911 | 7.5 | 2.10.1 |
Open | |
| CVE-2023-25658 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25659 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25660 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25662 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25663 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25665 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25666 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25667 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25669 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25670 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25671 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25672 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25673 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25674 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25675 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25676 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25801 | 7.8 | 2.12.0 |
Open | |
| CVE-2023-27579 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25661 | 6.5 | 2.11.1 |
Open | |
| GHSA-cqvq-fvhr-v6hc | 1 | 2.10.1 |
Open | |
| GHSA-xf83-q765-xm6m | 1 | 2.10.1 |
Open |
| sqlparse==0.2.4 | ||
|
|
||
| lightning==2.2.1 | ||
| tensorflow-cpu==2.10.0 |
There was a problem hiding this comment.
tensorflow-cpu 2.10.0 / requirements.txt
Total vulnerabilities: 48
| Critical: 6 | High: 39 | Medium: 1 | Low: 2 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2022-41880 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41900 | 9.8 | 2.10.1 |
Open | |
| CVE-2022-41902 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41910 | 9.1 | 2.10.1 |
Open | |
| CVE-2023-25664 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-25668 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-33976 | 7.5 | 2.13.0 |
Open | |
| CVE-2022-41883 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41884 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41886 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41887 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41888 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41889 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41890 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41891 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41893 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41894 | 8.1 | 2.10.1 |
Open | |
| CVE-2022-41895 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41896 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41897 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41898 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41899 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41901 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41907 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41908 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41909 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41911 | 7.5 | 2.10.1 |
Open | |
| CVE-2023-25658 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25659 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25660 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25662 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25663 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25665 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25666 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25667 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25669 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25670 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25671 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25672 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25673 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25674 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25675 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25676 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25801 | 7.8 | 2.12.0 |
Open | |
| CVE-2023-27579 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25661 | 6.5 | 2.11.1 |
Open | |
| GHSA-cqvq-fvhr-v6hc | 1 | 2.10.1 |
Open | |
| GHSA-xf83-q765-xm6m | 1 | 2.10.1 |
Open |
|
|
||
| # REST interface for models | ||
| flask==0.12.4 | ||
| flask-cors==3.0.3 |
There was a problem hiding this comment.
flask-cors 3.0.3 / requirements.txt
Total vulnerabilities: 3
| Critical: 0 | High: 2 | Medium: 1 | Low: 0 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2024-6221 | 7.5 | 4.0.2 |
Open | |
| CVE-2020-25032 | 7.5 | 3.0.9 |
Open | |
| CVE-2024-1681 | 5.3 | 4.0.1 |
Open |
| # REST interface for models | ||
| flask==0.12.4 | ||
| flask-cors==3.0.3 | ||
| gevent==1.3.6 |
There was a problem hiding this comment.
gevent 1.3.6 / requirements.txt
Total vulnerabilities: 1
| Critical: 1 | High: 0 | Medium: 0 | Low: 0 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2023-41419 | 9.8 | 23.9.0 |
Open |
| @@ -0,0 +1,3 @@ | |||
| import torch | |||
|
|
|||
| torch.hub.download_url_to_file("https://example.com", "/tmp/unsafe", hash_prefix=None) | |||
There was a problem hiding this comment.
Missing hash check in PyTorch
File: test.py | Checkov ID: CKV3_SAST_194
How To Fix
import torch
Downloading a file with hash verification
torch.hub.download_url_to_file('https://example.com/model.pth', 'model.pth', hash_prefix='1234567890abcdef')
Loading a model state dictionary with hash check
state_dict = torch.hub.load_state_dict_from_url('https://example.com/model.pth', check_hash=True)
Loading a model using model_zoo with hash check
model = torch.utils.model_zoo.load_url('https://example.com/model.pth', check_hash=True)
Description
CWE: CWE-347: Improper Verification of Cryptographic Signature
OWASP: A02:2021-Cryptographic Failures
CWE-347: Improper Verification of Cryptographic SignatureOWASP:
A02:2021-Cryptographic FailuresThis policy detects whether PyTorch functions are used to load remote files without hash verification. Downloading untrusted files without validating their hashes exposes applications to security risks, such as executing malicious code. Using the hash_prefix or check_hash arguments is crucial to ensure the integrity of downloaded files.
In this example, files are downloaded and loaded without any hash verification, exposing the application to potential security risks.
Python
import torch
# Downloading a file without hash verification
torch.hub.download_url_to_file('https://example.com/model.pth', 'model.pth')
# Loading a model state dictionary without hash check
state_dict = torch.hub.load_state_dict_from_url('https://example.com/model.pth')
# Loading a model using model_zoo without hash check
model = torch.utils.model_zoo.load_url('https://example.com/model.pth')
| @@ -0,0 +1,5 @@ | |||
| from huggingface_hub import hf_hub_download | |||
|
|
|||
| hf_hub_download("MIT/ast-finetuned-audioset-10-10-0.4593") | |||
There was a problem hiding this comment.
Download of Machine Learning Model Without Integrity Check
File: example2.py | Checkov ID: CKV3_SAST_99
How To Fix
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model", revision="specific_commit")
Description
CWE: CWE-494: Download of Code Without Integrity Check
OWASP: A08:2021-Software and Data Integrity Failures
CWE-494: Download of Code Without Integrity CheckOWASP:
A08:2021-Software and Data Integrity FailuresThis SAST policy identifies instances where machine learning models are downloaded without specifying a specific revision, which could lead to the use of untrusted or tampered models.
Vulnerable code example:
python
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model")
In the above example, the hf_hub_download function is used without specifying the revision parameter, which means the model can be updated or tampered with without verification.
|
|
||
| hf_hub_download("MIT/ast-finetuned-audioset-10-10-0.4593") | ||
|
|
||
| hf_hub_download("MIT/ast-finetuned-audioset-10-10-0.4593", revision=None) |
There was a problem hiding this comment.
Download of Machine Learning Model Without Integrity Check
File: example2.py | Checkov ID: CKV3_SAST_99
How To Fix
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model", revision="specific_commit")
Description
CWE: CWE-494: Download of Code Without Integrity Check
OWASP: A08:2021-Software and Data Integrity Failures
CWE-494: Download of Code Without Integrity CheckOWASP:
A08:2021-Software and Data Integrity FailuresThis SAST policy identifies instances where machine learning models are downloaded without specifying a specific revision, which could lead to the use of untrusted or tampered models.
Vulnerable code example:
python
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model")
In the above example, the hf_hub_download function is used without specifying the revision parameter, which means the model can be updated or tampered with without verification.
|
|
||
| lightning==2.2.1 | ||
| tensorflow-cpu==2.10.0 | ||
| tensorflow-gpu==2.10.0 |
There was a problem hiding this comment.
tensorflow-gpu 2.10.0 / requirements.txt
Total vulnerabilities: 48
| Critical: 6 | High: 39 | Medium: 1 | Low: 2 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2022-41880 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41900 | 9.8 | 2.10.1 |
Open | |
| CVE-2022-41902 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41910 | 9.1 | 2.10.1 |
Open | |
| CVE-2023-25664 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-25668 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-33976 | 7.5 | 2.13.0 |
Open | |
| CVE-2022-41883 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41884 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41886 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41887 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41888 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41889 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41890 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41891 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41893 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41894 | 8.1 | 2.10.1 |
Open | |
| CVE-2022-41895 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41896 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41897 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41898 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41899 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41901 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41907 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41908 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41909 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41911 | 7.5 | 2.10.1 |
Open | |
| CVE-2023-25658 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25659 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25660 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25662 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25663 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25665 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25666 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25667 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25669 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25670 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25671 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25672 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25673 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25674 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25675 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25676 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25801 | 7.8 | 2.12.0 |
Open | |
| CVE-2023-27579 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25661 | 6.5 | 2.11.1 |
Open | |
| GHSA-cqvq-fvhr-v6hc | 1 | 2.10.1 |
Open | |
| GHSA-xf83-q765-xm6m | 1 | 2.10.1 |
Open |
|
|
||
| # REST interface for models | ||
| flask==0.12.4 | ||
| flask-cors==3.0.3 |
There was a problem hiding this comment.
flask-cors 3.0.3 / requirements.txt
Total vulnerabilities: 3
| Critical: 0 | High: 2 | Medium: 1 | Low: 0 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2024-6221 | 7.5 | 4.0.2 |
Open | |
| CVE-2020-25032 | 7.5 | 3.0.9 |
Open | |
| CVE-2024-1681 | 5.3 | 4.0.1 |
Open |
| parsimonious==0.8.0 | ||
|
|
||
| # Used by semantic parsing code to format and postprocess SQL | ||
| sqlparse==0.2.4 |
There was a problem hiding this comment.
sqlparse 0.2.4 / requirements.txt
Total vulnerabilities: 2
| Critical: 0 | High: 2 | Medium: 0 | Low: 0 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2023-30608 | 7.5 | 0.4.4 |
Open | |
| CVE-2024-4340 | 7.5 | 0.5.0 |
Open |
| requests>=2.18 | ||
|
|
||
| # progress bars in data cleaning scripts | ||
| tqdm>=4.19 |
There was a problem hiding this comment.
tqdm 4.19 / requirements.txt
Total vulnerabilities: 1
| Critical: 0 | High: 0 | Medium: 0 | Low: 1 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2024-34062 | 3.9 | 4.66.3 |
Open |
| lightning==2.2.1 | ||
| tensorflow-cpu==2.10.0 | ||
| tensorflow-gpu==2.10.0 | ||
| langchain==0.0.350 |
There was a problem hiding this comment.
langchain 0.0.350 / requirements.txt
Total vulnerabilities: 4
| Critical: 0 | High: 0 | Medium: 2 | Low: 2 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2024-2965 | 4.2 | 0.2.5 |
Open | |
| CVE-2024-3571 | 6.5 | 0.0.353 |
Open | |
| CVE-2024-8309 | 4.9 | 0.2.0 |
Open | |
| CVE-2024-0243 | 3.7 | 0.1.0 |
Open |
| sqlparse==0.2.4 | ||
|
|
||
| lightning==2.2.1 | ||
| tensorflow-cpu==2.10.0 |
There was a problem hiding this comment.
tensorflow-cpu 2.10.0 / requirements.txt
Total vulnerabilities: 48
| Critical: 6 | High: 39 | Medium: 1 | Low: 2 |
|---|
| Vulnerability ID | Severity | CVSS | Fixed in | Status |
|---|---|---|---|---|
| CVE-2022-41880 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41900 | 9.8 | 2.10.1 |
Open | |
| CVE-2022-41902 | 9.1 | 2.10.1 |
Open | |
| CVE-2022-41910 | 9.1 | 2.10.1 |
Open | |
| CVE-2023-25664 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-25668 | 9.8 | 2.12.0 |
Open | |
| CVE-2023-33976 | 7.5 | 2.13.0 |
Open | |
| CVE-2022-41883 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41884 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41886 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41887 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41888 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41889 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41890 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41891 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41893 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41894 | 8.1 | 2.10.1 |
Open | |
| CVE-2022-41895 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41896 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41897 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41898 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41899 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41901 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41907 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41908 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41909 | 7.5 | 2.10.1 |
Open | |
| CVE-2022-41911 | 7.5 | 2.10.1 |
Open | |
| CVE-2023-25658 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25659 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25660 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25662 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25663 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25665 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25666 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25667 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25669 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25670 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25671 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25672 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25673 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25674 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25675 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25676 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25801 | 7.8 | 2.12.0 |
Open | |
| CVE-2023-27579 | 7.5 | 2.12.0 |
Open | |
| CVE-2023-25661 | 6.5 | 2.11.1 |
Open | |
| GHSA-cqvq-fvhr-v6hc | 1 | 2.10.1 |
Open | |
| GHSA-xf83-q765-xm6m | 1 | 2.10.1 |
Open |
| @@ -0,0 +1,138 @@ | |||
| torch==0.4.1 | |||
| @@ -0,0 +1,3 @@ | |||
| import torch | |||
|
|
|||
| torch.hub.download_url_to_file("https://example.com", "/tmp/unsafe", hash_prefix=None) | |||
There was a problem hiding this comment.
Missing hash check in PyTorch
File: test.py | Checkov ID: CKV3_SAST_194
How To Fix
import torch
Downloading a file with hash verification
torch.hub.download_url_to_file('https://example.com/model.pth', 'model.pth', hash_prefix='1234567890abcdef')
Loading a model state dictionary with hash check
state_dict = torch.hub.load_state_dict_from_url('https://example.com/model.pth', check_hash=True)
Loading a model using model_zoo with hash check
model = torch.utils.model_zoo.load_url('https://example.com/model.pth', check_hash=True)
Description
CWE: CWE-347: Improper Verification of Cryptographic Signature
OWASP: A02:2021-Cryptographic Failures
CWE-347: Improper Verification of Cryptographic SignatureOWASP:
A02:2021-Cryptographic FailuresThis policy detects whether PyTorch functions are used to load remote files without hash verification. Downloading untrusted files without validating their hashes exposes applications to security risks, such as executing malicious code. Using the hash_prefix or check_hash arguments is crucial to ensure the integrity of downloaded files.
In this example, files are downloaded and loaded without any hash verification, exposing the application to potential security risks.
Python
import torch
# Downloading a file without hash verification
torch.hub.download_url_to_file('https://example.com/model.pth', 'model.pth')
# Loading a model state dictionary without hash check
state_dict = torch.hub.load_state_dict_from_url('https://example.com/model.pth')
# Loading a model using model_zoo without hash check
model = torch.utils.model_zoo.load_url('https://example.com/model.pth')
| @@ -0,0 +1,5 @@ | |||
| from huggingface_hub import hf_hub_download | |||
|
|
|||
| hf_hub_download("MIT/ast-finetuned-audioset-10-10-0.4593") | |||
There was a problem hiding this comment.
Download of Machine Learning Model Without Integrity Check
File: example2.py | Checkov ID: CKV3_SAST_99
How To Fix
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model", revision="specific_commit")
Description
CWE: CWE-494: Download of Code Without Integrity Check
OWASP: A08:2021-Software and Data Integrity Failures
CWE-494: Download of Code Without Integrity CheckOWASP:
A08:2021-Software and Data Integrity FailuresThis SAST policy identifies instances where machine learning models are downloaded without specifying a specific revision, which could lead to the use of untrusted or tampered models.
Vulnerable code example:
python
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model")
In the above example, the hf_hub_download function is used without specifying the revision parameter, which means the model can be updated or tampered with without verification.
|
|
||
| hf_hub_download("MIT/ast-finetuned-audioset-10-10-0.4593") | ||
|
|
||
| hf_hub_download("MIT/ast-finetuned-audioset-10-10-0.4593", revision=None) |
There was a problem hiding this comment.
Download of Machine Learning Model Without Integrity Check
File: example2.py | Checkov ID: CKV3_SAST_99
How To Fix
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model", revision="specific_commit")
Description
CWE: CWE-494: Download of Code Without Integrity Check
OWASP: A08:2021-Software and Data Integrity Failures
CWE-494: Download of Code Without Integrity CheckOWASP:
A08:2021-Software and Data Integrity FailuresThis SAST policy identifies instances where machine learning models are downloaded without specifying a specific revision, which could lead to the use of untrusted or tampered models.
Vulnerable code example:
python
from huggingface_hub import hf_hub_download
model = hf_hub_download("some_model")
In the above example, the hf_hub_download function is used without specifying the revision parameter, which means the model can be updated or tampered with without verification.
There was a problem hiding this comment.
Checkov found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
No description provided.