inflight
inflight copied to clipboard
Memory leak detected in version 1.0.6 by veracode
Veracode has detected a memory leak vulnerability
Any update on this vulnarability?
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. Still getting this error.
Also wondering if this issue persists? Looks like glob up to glob@9 depends on inflight and other packages in our project depend on glob@<9 so we are stuck with the memory leak warnings in CI
Hello, any update on this?
veracode detected a memory leak vulnerability @1.0.6
Is this repo dead?
In https://github.com/isaacs/node-glob/issues/435 @isaacs mentioned that newer versions of glob >= 9 no longer use inflight
.
The remediation for those using older versions of glob would then, presumably be, to upgrade to a newer version.
Sadly, this may not be an option for projects with other transitive dependencies (npmjs.com lists 1628 dependents: https://www.npmjs.com/package/inflight?activeTab=dependents ). These would all be advised to move away as this library looks to be abandoned.
Unfortunately, in the mean-time applications that transitively use this library would need to determine how they are using this library to determine if they are vulnerable. Note that the impact of this would be a Denial of Service but would require an attacker to trigger many requests (we were able to reproduce this with millions of simple requests, that may be less in other cases).
It looks like @GreihMurray has been working on using an arbitrary limit of 500 concurrent requests: https://github.com/isaacs/inflight/compare/main...GreihMurray:inflight-fork:main . This might help but would need to be tested. Also 500 requests may not be enough for some purposes and I'm not sure what happens > 500 requests.
Maybe someone else (more familiar with how this is used) could help out here and provide a PR / fixed fork?
In https://github.com/isaacs/node-glob/issues/435 @isaacs mentioned that newer versions of glob >= 9 no longer use
inflight
. The remediation for those using older versions of glob would then, presumably be, to upgrade to a newer version.Sadly, this may not be an option for projects with other transitive dependencies (npmjs.com lists 1628 dependents: https://www.npmjs.com/package/inflight?activeTab=dependents ). These would all be advised to move away as this library looks to be abandoned.
Unfortunately, in the mean-time applications that transitively use this library would need to determine how they are using this library to determine if they are vulnerable. Note that the impact of this would be a Denial of Service but would require an attacker to trigger many requests (we were able to reproduce this with millions of simple requests, that may be less in other cases).
It looks like @GreihMurray has been working on using an arbitrary limit of 500 concurrent requests: https://github.com/isaacs/inflight/compare/main...GreihMurray:inflight-fork:main . This might help but would need to be tested. Also 500 requests may not be enough for some purposes and I'm not sure what happens > 500 requests.
Maybe someone else (more familiar with how this is used) could help out here and provide a PR / fixed fork?
I've done a few basic tests to try and remedy this with no success. 500 was an arbitrary number which I just selected more or less at random while testing. Unfortunately I am unable to get it to work and would agree that the best practice is likely upgrade other dependencies as possible
If anyone is seeing this transitively due to usage of pino-pretty, I entered an issue there: https://github.com/mcollina/help-me/issues/17
And related PR to fix: https://github.com/mcollina/help-me/pull/18
Please give those a thumbs up if you are affected. Thanks!
Any update on this?
@0xSmiley No
https://github.com/isaacs/inflight/issues/5#issuecomment-2126153820