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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

inflight - transient dependency introduced memory leak #423

Closed
jorgemlopez opened this issue Dec 4, 2023 · 8 comments
Closed

inflight - transient dependency introduced memory leak #423

jorgemlopez opened this issue Dec 4, 2023 · 8 comments

Comments

@jorgemlopez
Copy link

jorgemlopez commented Dec 4, 2023

馃懏 Responsible Disclosure

Do not open issues that might have security implications. It is critical that security related issues
are reported privately so we have time to address them before they become public knowledge.

Please read our SECURITY.md before reporting a vulnerability.

Individuals who find potential vulnerabilities in a package are invited
to complete a vulnerability report on the dedicated HackerOne organization:

https://hackerone.com/fastify

Vulnerabilities can also be reported by emailing to Fastify core members:

Summary

This package uses a version of node-glob which uses as a dependency inflight. The version of inflight uses has a memory leak. See issue: isaacs/inflight#18.

Screenshot 2023-12-04 at 1 14 23鈥疨M

Inflight seems to have been abandoned and it is not longer a dependency of node-glob version 9 and above. However @nestjs/static is not compatible with node-glob v9+.

Proposed Resolution

To fix this, you will need to use fast-glob or upgrade the dependency to glob v9 where the dependency on inflight has been removed.

@jorgemlopez
Copy link
Author

@mabreuortega for visibility

@gurgunday
Copy link
Member

gurgunday commented Dec 4, 2023

Version 9 only supports node 16+ and (AFAIK) it contains a blue-oak鈥搇icensed dependency

Edit: not sure if it's really a leak

@Uzlopak
Copy link
Contributor

Uzlopak commented Dec 4, 2023

Reading the sec vuln report it seems to be just non issue.

Memory Leak: inflight is vulnerable to a Memory Leak. The vulnerability is due to lack of restrictions on how many callbacks the library can concurrently support, which can result in a NodeJS out of heap memory crash.

@jorgemlopez
Copy link
Author

jorgemlopez commented Dec 4, 2023

@jorgemlopez
Copy link
Author

Here is the closed issue in node-glob: isaacs/node-glob#435

@epignosisx
Copy link

Leaving this here for inspiration:

mcollina/help-me#19

@mcollina
Copy link
Member

If you land yourself here, don't worry: this module does not suffer from a memory leak, as the call to glob is used only once during startup.

@mcollina
Copy link
Member

mcollina commented Feb 2, 2024

This is fixed in @fastify/static v7

@mcollina mcollina closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants