jusso-dev/ISMSearch
Find, fix and prevent vulnerabilities in your code.
critical severity
new
- Vulnerable module: next
- Introduced through: next@13.5.4
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › next@13.5.4Remediation: Upgrade to next@13.5.9.
Overview
next is a react framework.
Affected versions of this package are vulnerable to Improper Authorization due to the improper handling of the x-middleware-subrequest
header. An attacker can bypass authorization checks by sending crafted requests containing this specific header.
Workaround
This can be mitigated by preventing external user requests which contain the x-middleware-subrequest
header from reaching your Next.js
application.
Remediation
Upgrade next
to version 12.3.5, 13.5.9, 14.2.25, 15.2.3, 15.3.0-canary.12 or higher.
References
high severity
- Vulnerable module: next
- Introduced through: next@13.5.4
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › next@13.5.4Remediation: Upgrade to next@13.5.7.
Overview
next is a react framework.
Affected versions of this package are vulnerable to Acceptance of Extraneous Untrusted Data With Trusted Data by sending a crafted HTTP request, which allows the attacker to poison the cache of a non-dynamic server-side rendered route in the page router. This will coerce the request to cache a route that is meant to not be cached and send a Cache-Control: s-maxage=1, a stale-while-revalidate
header, which some upstream CDNs may cache as well.
Note:
This is only vulnerable if:
The user is using pages router
The user is using non-dynamic server-side rendered routes.
Users are not affected if:
They are using the app router
The deployments are on Vercel
Remediation
Upgrade next
to version 13.5.7, 14.2.10 or higher.
References
high severity
- Vulnerable module: next
- Introduced through: next@13.5.4
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › next@13.5.4Remediation: Upgrade to next@13.5.8.
Overview
next is a react framework.
Affected versions of this package are vulnerable to Missing Authorization when using pathname-based checks in middleware for authorization decisions. If i18n configuration is not configured, an attacker can get unintended access to pages one level under the application's root directory.
e.g. https://example.com/foo
is accessible. https://example.com/
and https://example.com/foo/bar
are not.
Note:
Only self-hosted applications are vulnerable. The vulnerability has been fixed by Vercel on the server side.
Remediation
Upgrade next
to version 13.5.8, 14.2.15, 15.0.0-canary.177 or higher.
References
high severity
- Vulnerable module: next
- Introduced through: next@13.5.4
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › next@13.5.4Remediation: Upgrade to next@14.2.7.
Overview
next is a react framework.
Affected versions of this package are vulnerable to Uncontrolled Recursion through the image optimization feature. An attacker can cause excessive CPU consumption by exploiting this vulnerability.
Workaround
Ensure that the next.config.js
file has either images.unoptimized
, images.loader
or images.loaderFile
assigned.
Remediation
Upgrade next
to version 14.2.7, 15.0.0-canary.109 or higher.
References
medium severity
- Vulnerable module: @grpc/grpc-js
- Introduced through: firebase@9.23.0
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › firebase@9.23.0 › @firebase/firestore@3.13.0 › @grpc/grpc-js@1.7.3Remediation: Upgrade to firebase@10.1.0.
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › firebase@9.23.0 › @firebase/firestore-compat@0.3.12 › @firebase/firestore@3.13.0 › @grpc/grpc-js@1.7.3Remediation: Upgrade to firebase@10.1.0.
Overview
@grpc/grpc-js is a gRPC Library for Node
Affected versions of this package are vulnerable to Uncontrolled Resource Consumption via the grpc.max_receive_message_length
channel option. An attacker can cause a denial of service by sending messages that exceed the configured limits, which are then buffered or decompressed into memory.
Remediation
Upgrade @grpc/grpc-js
to version 1.8.22, 1.9.15, 1.10.9 or higher.
References
medium severity
- Vulnerable module: next
- Introduced through: next@13.5.4
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › next@13.5.4Remediation: Upgrade to next@13.5.8.
Overview
next is a react framework.
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the Server Actions process. An attacker can cause the server to hang by constructing requests that leave Server-Actions requests pending until the hosting provider terminates the function execution.
Note:
This is only exploitable if there are no protections against long-running Server Action invocations.
Remediation
Upgrade next
to version 13.5.8, 14.2.21, 15.1.2 or higher.
References
medium severity
- Vulnerable module: inflight
- Introduced through: firebase-admin@11.11.1
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › firebase-admin@11.11.1 › @google-cloud/firestore@6.8.0 › google-gax@3.6.1 › protobufjs-cli@1.1.1 › glob@8.1.0 › inflight@1.0.6
Overview
Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via the makeres
function due to improperly deleting keys from the reqs
object after execution of callbacks. This behavior causes the keys to remain in the reqs
object, which leads to resource exhaustion.
Exploiting this vulnerability results in crashing the node
process or in the application crash.
Note: This library is not maintained, and currently, there is no fix for this issue. To overcome this vulnerability, several dependent packages have eliminated the use of this library.
To trigger the memory leak, an attacker would need to have the ability to execute or influence the asynchronous operations that use the inflight module within the application. This typically requires access to the internal workings of the server or application, which is not commonly exposed to remote users. Therefore, “Attack vector” is marked as “Local”.
PoC
const inflight = require('inflight');
function testInflight() {
let i = 0;
function scheduleNext() {
let key = `key-${i++}`;
const callback = () => {
};
for (let j = 0; j < 1000000; j++) {
inflight(key, callback);
}
setImmediate(scheduleNext);
}
if (i % 100 === 0) {
console.log(process.memoryUsage());
}
scheduleNext();
}
testInflight();
Remediation
There is no fixed version for inflight
.
References
medium severity
- Vulnerable module: next
- Introduced through: next@13.5.4
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › next@13.5.4Remediation: Upgrade to next@14.1.1.
Overview
next is a react framework.
Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF) through the Host
header manipulation. An attacker can make unauthorized requests appearing to originate from the server.
Notes:
Prerequisites:
Next.js (<14.1.1) is running in a self-hosted manner.
The Next.js application makes use of Server Actions.
The Server Action performs a redirect to a relative path which starts with a
/
.
Remediation
Upgrade next
to version 14.1.1 or higher.
References
medium severity
- Vulnerable module: @firebase/auth
- Introduced through: firebase@9.23.0
Detailed paths
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › firebase@9.23.0 › @firebase/auth@0.23.2Remediation: Upgrade to firebase@10.9.0.
-
Introduced through: ism-search@jusso-dev/ISMSearch#5d8d37e1801c06644ed0a41a95ac49f0564883ff › firebase@9.23.0 › @firebase/auth-compat@0.4.2 › @firebase/auth@0.23.2Remediation: Upgrade to firebase@10.9.0.
Overview
@firebase/auth is a The Firebase Authenticaton component of the Firebase JS SDK.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the _authTokenSyncURL
field in the FIREBASE_DEFAULTS
settings due to improper user input sanitization. An attacker can manipulate session synchronization by setting this cookie field to point to a malicious server, thereby capturing user session data transmitted by the SDK.
Details
A cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.
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 @firebase/auth
to version 1.6.2 or higher.