Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@2.8.1.
Overview
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.
Affected versions of this package are vulnerable to Sandbox Bypass. Users were allowed to insert str.format through web templates, leading to an escape from sandbox.
Remediation
Upgrade Jinja2 to version 2.8.1 or higher.
References
high severity
- Vulnerable module: setuptools
- Introduced through: pyvcf@0.6.8
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › pyvcf@0.6.8 › setuptools@40.5.0Remediation: Upgrade to pyvcf@0.6.8.
Overview
Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') through the package_index module's download functions due to the unsafe usage of os.system. An attacker can execute arbitrary commands on the system by providing malicious URLs or manipulating the URLs retrieved from package index servers.
Note
Because easy_install and package_index are deprecated, the exploitation surface is reduced, but it's conceivable through social engineering or minor compromise to a package index could grant remote access.
Remediation
Upgrade setuptools to version 70.0.0 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@2.10.1.
Overview
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.
Affected versions of this package are vulnerable to Sandbox Escape via the str.format_map. This vulnerability requires the attacker to have information about sensitive attributes, and exploiting it could allow the attacker to access sensitive content.
Workaround
Override the is_safe_attribute method on the sandbox and explicitly disallow the format_map method on string objects.
Remediation
Upgrade Jinja2 to version 2.10.1 or higher.
References
medium severity
- Vulnerable module: setuptools
- Introduced through: pyvcf@0.6.8
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › pyvcf@0.6.8 › setuptools@40.5.0Remediation: Upgrade to pyvcf@0.6.8.
Overview
Affected versions of this package are vulnerable to Directory Traversal through the PackageIndex._download_url method. Due to insufficient sanitization of special characters, an attacker can write files to arbitrary locations on the filesystem with the permissions of the process running the Python code. In certain scenarios, an attacker could potentially escalate to remote code execution by leveraging malicious URLs present in a package index.
PoC
python poc.py
# Payload file: http://localhost:8000/%2fhome%2fuser%2f.ssh%2fauthorized_keys
# Written to: /home/user/.ssh/authorized_keys
Details
A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.
Directory Traversal vulnerabilities can be generally divided into two types:
- Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.
st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.
If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.
curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa
Note %2e is the URL encoded version of . (dot).
- Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as
Zip-Slip.
One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.
The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:
2018-04-15 22:04:29 ..... 19 19 good.txt
2018-04-15 22:04:42 ..... 20 20 ../../../../../../root/.ssh/authorized_keys
Remediation
Upgrade setuptools to version 78.1.1 or higher.
References
medium severity
- Vulnerable module: setuptools
- Introduced through: pyvcf@0.6.8
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › pyvcf@0.6.8 › setuptools@40.5.0Remediation: Upgrade to pyvcf@0.6.8.
Overview
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via crafted HTML package or custom PackageIndex page.
Note:
Only a small portion of the user base is impacted by this flaw. Setuptools maintainers pointed out that package_index is deprecated (not formally, but “in spirit”) and the vulnerability isn't reachable through standard, recommended workflows.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.
The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.
Let’s take the following regular expression as an example:
regex = /A(B|C+)+D/
This regular expression accomplishes the following:
AThe string must start with the letter 'A'(B|C+)+The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the+matches one or more times). The+at the end of this section states that we can look for one or more matches of this section.DFinally, we ensure this section of the string ends with a 'D'
The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD
It most cases, it doesn't take very long for a regex engine to find a match:
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total
The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.
Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.
Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:
- CCC
- CC+C
- C+CC
- C+C+C.
The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.
From there, the number of steps the engine must use to validate a string just continues to grow.
| String | Number of C's | Number of steps |
|---|---|---|
| ACCCX | 3 | 38 |
| ACCCCX | 4 | 71 |
| ACCCCCX | 5 | 136 |
| ACCCCCCCCCCCCCCX | 14 | 65,553 |
By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.
Remediation
Upgrade setuptools to version 65.5.1 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@3.1.3.
Overview
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the xmlattr filter, when using keys containing spaces in an application accepts keys as user input. An attacker can inject arbitrary HTML attributes into the rendered HTML template, bypassing the auto-escaping mechanism, which may lead to the execution of untrusted scripts in the context of the user's browser session.
Note
Accepting keys as user input is not common or a particularly intended use case of the xmlattr filter, and an application doing so should already be verifying what keys are provided regardless of this fix.
Details
Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as < and > can be coded as > in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
| Type | Origin | Description |
|---|---|---|
| Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
| Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
| DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
| Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?,&,/,<,>and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade Jinja2 to version 3.1.3 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@3.1.4.
Overview
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) through the xmlattr filter. An attacker can manipulate the output of web pages by injecting additional attributes into elements, potentially leading to unauthorized actions or information disclosure.
Note: This vulnerability derives from an improper fix of CVE-2024-22195, which only addressed spaces but not other characters.
Details
Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as < and > can be coded as > in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
| Type | Origin | Description |
|---|---|---|
| Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
| Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
| DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
| Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?,&,/,<,>and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade Jinja2 to version 3.1.4 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@3.1.5.
Overview
Affected versions of this package are vulnerable to Improper Neutralization when importing a macro in a template whose filename is also a template. This will result in a SyntaxError: f-string: invalid syntax error message because the filename is not properly escaped, indicating that it is being treated as a format string.
Note: This is only exploitable when the attacker controls both the content and filename of a template and the application executes untrusted templates.
Remediation
Upgrade jinja2 to version 3.1.5 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@3.1.5.
Overview
Affected versions of this package are vulnerable to Template Injection when an attacker controls the content of a template. This is due to an oversight in the sandboxed environment's method detection when using a stored reference to a malicious string's format method, which can then be executed through a filter.
Note: This is only exploitable through custom filters in an application.
Remediation
Upgrade jinja2 to version 3.1.5 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@3.1.6.
Overview
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.
Affected versions of this package are vulnerable to Template Injection through the |attr filter. An attacker that controls the content of a template can escape the sandbox and execute arbitrary Python code by using the |attr filter to get a reference to a string's plain format method, bypassing the environment's attribute lookup.
Note:
This is only exploitable if the application executes untrusted templates.
Remediation
Upgrade Jinja2 to version 3.1.6 or higher.
References
medium severity
- Vulnerable module: jinja2
- Introduced through: jinja2@2.7.3
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › jinja2@2.7.3Remediation: Upgrade to jinja2@2.11.3.
Overview
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.
Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS). The ReDoS vulnerability is mainly due to the _punctuation_re regex operator and its use of multiple wildcards. The last wildcard is the most exploitable as it searches for trailing punctuation.
This issue can be mitigated by using Markdown to format user content instead of the urlize filter, or by implementing request timeouts or limiting process memory.
PoC by Yeting Li
from jinja2.utils import urlize
from time import perf_counter
for i in range(3):
text = "abc@" + "." * (i+1)*5000 + "!"
LEN = len(text)
BEGIN = perf_counter()
urlize(text)
DURATION = perf_counter() - BEGIN
print(f"{LEN}: took {DURATION} seconds!")
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.
The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.
Let’s take the following regular expression as an example:
regex = /A(B|C+)+D/
This regular expression accomplishes the following:
AThe string must start with the letter 'A'(B|C+)+The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the+matches one or more times). The+at the end of this section states that we can look for one or more matches of this section.DFinally, we ensure this section of the string ends with a 'D'
The expression would match inputs such as ABBD, ABCCCCD, ABCBCCCD and ACCCCCD
It most cases, it doesn't take very long for a regex engine to find a match:
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
0.04s user 0.01s system 95% cpu 0.052 total
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
1.79s user 0.02s system 99% cpu 1.812 total
The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.
Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as catastrophic backtracking.
Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:
- CCC
- CC+C
- C+CC
- C+C+C.
The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use RegEx 101 debugger to see the engine has to take a total of 38 steps before it can determine the string doesn't match.
From there, the number of steps the engine must use to validate a string just continues to grow.
| String | Number of C's | Number of steps |
|---|---|---|
| ACCCX | 3 | 38 |
| ACCCCX | 4 | 71 |
| ACCCCCX | 5 | 136 |
| ACCCCCCCCCCCCCCX | 14 | 65,553 |
By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.
Remediation
Upgrade Jinja2 to version 2.11.3 or higher.
References
low severity
- Vulnerable module: numpy
- Introduced through: numpy@1.21.3, illuminate@0.6.5 and others
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › numpy@1.21.3Remediation: Upgrade to numpy@1.22.0.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › illuminate@0.6.5 › numpy@1.21.3Remediation: Upgrade to illuminate@0.6.5.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › matplotlib@1.5.1 › numpy@1.21.3Remediation: Upgrade to matplotlib@1.5.1.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › illuminate@0.6.5 › pandas@1.3.5 › numpy@1.21.3Remediation: Upgrade to illuminate@0.6.5.
Overview
numpy is a fundamental package needed for scientific computing with Python.
Affected versions of this package are vulnerable to Buffer Overflow due to missing boundary checks in the array_from_pyobj function of fortranobject.c. This may allow an attacker to conduct Denial of Service by carefully constructing an array with negative values.
Remediation
Upgrade numpy to version 1.22.0 or higher.
References
low severity
- Vulnerable module: numpy
- Introduced through: numpy@1.21.3, illuminate@0.6.5 and others
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › numpy@1.21.3Remediation: Upgrade to numpy@1.22.0.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › illuminate@0.6.5 › numpy@1.21.3Remediation: Upgrade to illuminate@0.6.5.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › matplotlib@1.5.1 › numpy@1.21.3Remediation: Upgrade to matplotlib@1.5.1.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › illuminate@0.6.5 › pandas@1.3.5 › numpy@1.21.3Remediation: Upgrade to illuminate@0.6.5.
Overview
numpy is a fundamental package needed for scientific computing with Python.
Affected versions of this package are vulnerable to Denial of Service (DoS) due to an incomplete string comparison in the numpy.core component, which may allow attackers to fail the APIs via constructing specific string objects.
Details
Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.
Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.
One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.
When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.
Two common types of DoS vulnerabilities:
High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.
Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm
wspackage
Remediation
Upgrade numpy to version 1.22.0rc1 or higher.
References
low severity
- Vulnerable module: numpy
- Introduced through: numpy@1.21.3, illuminate@0.6.5 and others
Detailed paths
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › numpy@1.21.3Remediation: Upgrade to numpy@1.22.2.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › illuminate@0.6.5 › numpy@1.21.3Remediation: Upgrade to illuminate@0.6.5.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › matplotlib@1.5.1 › numpy@1.21.3Remediation: Upgrade to matplotlib@1.5.1.
-
Introduced through: HumanCellAtlas/skylab@HumanCellAtlas/skylab#e31492cd0219ff6f236cd0500401004f16f0fe41 › illuminate@0.6.5 › pandas@1.3.5 › numpy@1.21.3Remediation: Upgrade to illuminate@0.6.5.
Overview
numpy is a fundamental package needed for scientific computing with Python.
Affected versions of this package are vulnerable to NULL Pointer Dereference due to missing return-value validation in the PyArray_DescrNew function, which may allow attackers to conduct Denial of Service attacks by repetitively creating and sort arrays.
Note: This may likely only happen if application memory is already exhausted, as it requires the newdescr object of the PyArray_DescrNew to evaluate to NULL.
Remediation
Upgrade numpy to version 1.22.2 or higher.