Vulnerabilities

2 via 3 paths

Dependencies

115

Source

GitHub

Commit

40d57947

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
Status
  • 2
  • 0
  • 0

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: shelljs@0.8.5 and precinct@6.3.1

Detailed paths

  • Introduced through: va-dep-watch@forceuser/va-dep-watch#40d579472ea2b869643627dad3a1316b4c587299 shelljs@0.8.5 glob@7.2.3 inflight@1.0.6
  • Introduced through: va-dep-watch@forceuser/va-dep-watch#40d579472ea2b869643627dad3a1316b4c587299 precinct@6.3.1 detective-typescript@5.8.0 @typescript-eslint/typescript-estree@2.34.0 glob@7.2.3 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

Improper Input Validation

  • Vulnerable module: postcss
  • Introduced through: precinct@6.3.1

Detailed paths

  • Introduced through: va-dep-watch@forceuser/va-dep-watch#40d579472ea2b869643627dad3a1316b4c587299 precinct@6.3.1 detective-postcss@3.0.1 postcss@7.0.39
    Remediation: Upgrade to precinct@7.0.0.

Overview

postcss is a PostCSS is a tool for transforming styles with JS plugins.

Affected versions of this package are vulnerable to Improper Input Validation when parsing external Cascading Style Sheets (CSS) with linters using PostCSS. An attacker can cause discrepancies by injecting malicious CSS rules, such as @font-face{ font:(\r/*);}. This vulnerability is because of an insecure regular expression usage in the RE_BAD_BRACKET variable.

Remediation

Upgrade postcss to version 8.4.31 or higher.

References