Vulnerabilities

4 via 89 paths

Dependencies

1155

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 3
  • 1
Status
  • 4
  • 0
  • 0

medium severity

Cross-site Scripting (XSS)

  • Vulnerable module: video.js
  • Introduced through: video.js@5.3.0 and videojs-ima@googleads/videojs-ima#0.3.0

Detailed paths

  • Introduced through: @guardian/frontend@guardian/frontend video.js@5.3.0
    Remediation: Upgrade to video.js@7.14.3.
  • Introduced through: @guardian/frontend@guardian/frontend videojs-ima@googleads/videojs-ima#0.3.0 video.js@5.3.0

Overview

video.js is a web video player built from the ground up for an HTML5 world.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS). The src attribute of track tag allows to bypass HTML escaping and execute arbitrary code.

PoC

by Snyk

<video id="my-video" class="video-js" controls width="300" height="200" data-setup=''>
  <source src="video.mp4" type="video/mp4"/>
  <track src="x:&quot;&gt;&lt;img src=1 onerror=&quot;alert(1)&quot;&gt;">
</video>

The PoC triggers browser to execute alert(1) JavaScript payload.

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 &lt; and > can be coded as &gt; 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 video.js to version 7.14.3 or higher.

References

medium severity

Improper Validation of Specified Index, Position, or Offset in Input

  • Vulnerable module: uuid
  • Introduced through: webpack-dev-server@5.2.6

Detailed paths

  • Introduced through: @guardian/frontend@guardian/frontend webpack-dev-server@5.2.6 sockjs@0.3.24 uuid@8.3.2

Overview

uuid is a RFC4122 (v1, v4, and v5) compliant UUID library.

Affected versions of this package are vulnerable to Improper Validation of Specified Index, Position, or Offset in Input due to accepting external output buffers but not rejecting out-of-range writes (small buf or large offset). This inconsistency allows silent partial writes into caller-provided buffers.

PoC

cd /home/StrawHat/uuid
npm ci
npm run build

node --input-type=module -e "
import {v4,v5,v6} from './dist-node/index.js';
const ns='6ba7b810-9dad-11d1-80b4-00c04fd430c8';
for (const [name,fn] of [
  ['v4',()=>v4({},new Uint8Array(8),4)],
  ['v5',()=>v5('x',ns,new Uint8Array(8),4)],
  ['v6',()=>v6({},new Uint8Array(8),4)],
]) {
  try { fn(); console.log(name,'NO_THROW'); }
  catch(e){ console.log(name,'THREW',e.name); }
}"

Remediation

Upgrade uuid to version 11.1.1, 14.0.0 or higher.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: @babel/cli@7.29.7 and jest@29.7.0

Detailed paths

  • Introduced through: @guardian/frontend@guardian/frontend @babel/cli@7.29.7 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 @jest/reporters@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 @jest/reporters@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 @jest/reporters@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 @jest/reporters@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-resolve-dependencies@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 babel-jest@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-resolve-dependencies@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-circus@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 @jest/core@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: @guardian/frontend@guardian/frontend jest@29.7.0 jest-cli@29.7.0 create-jest@29.7.0 jest-config@29.7.0 jest-runner@29.7.0 jest-runtime@29.7.0 @jest/globals@29.7.0 @jest/expect@29.7.0 jest-snapshot@29.7.0 @jest/transform@29.7.0 babel-plugin-istanbul@6.1.1 test-exclude@6.0.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

low severity

Directory Traversal

  • Vulnerable module: sirv
  • Introduced through: webpack-bundle-analyzer@4.10.2

Detailed paths

  • Introduced through: @guardian/frontend@guardian/frontend webpack-bundle-analyzer@4.10.2 sirv@2.0.4
    Remediation: Upgrade to webpack-bundle-analyzer@5.2.0.

Overview

sirv is a The optimized & lightweight middleware for serving requests to static assets

Affected versions of this package are vulnerable to Directory Traversal via the viaLocal function, which uses a dirname prefix. An attacker can access files outside the intended public directory by sending crafted requests that exploit symlinks and naming similarities, bypassing access restrictions.

Note: This is only exploitable if the server is explicitly exposed to the network using the --host flag or the server.host configuration option, the public directory feature is enabled, and there are symlinks in a public directory.

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 sirv to version 3.0.2 or higher.

References