Vulnerabilities

7 via 7 paths

Dependencies

133

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
  • 4
  • 1
Status
  • 7
  • 0
  • 0

high severity

Denial of Service (DoS)

  • Vulnerable module: apollo-server-core
  • Introduced through: apollo-server-express@1.4.0

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api apollo-server-express@1.4.0 apollo-server-core@1.4.0
    Remediation: Upgrade to apollo-server-express@3.0.0.

Overview

apollo-server-core is a core module of the Apollo community GraphQL Server.

Affected versions of this package are vulnerable to Denial of Service (DoS) by accepting an unbounded amount of memory in the cache.

NOTE: The size of a cache can be limited with the cache: "bounded" option as of version 3.9.0.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade apollo-server-core to version 3.9.0 or higher.

References

high severity

Information Exposure

  • Vulnerable module: apollo-server-core
  • Introduced through: apollo-server-express@1.4.0

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api apollo-server-express@1.4.0 apollo-server-core@1.4.0
    Remediation: Upgrade to apollo-server-express@2.1.0.

Overview

apollo-server-core is a core module of the Apollo community GraphQL Server.

Affected versions of this package are vulnerable to Information Exposure. It does not properly enforce validation rules when creating subscription servers, which includes a NoInstrospection rule for the Websocket. This leaks the GraphQL schema types, their relations and human-readable names.

Remediation

Upgrade apollo-server-core to version 2.14.2 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: node-fetch
  • Introduced through: isomorphic-fetch@2.2.1

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api isomorphic-fetch@2.2.1 node-fetch@1.7.3
    Remediation: Upgrade to isomorphic-fetch@3.0.0.

Overview

node-fetch is a light-weight module that brings window.fetch to node.js

Affected versions of this package are vulnerable to Information Exposure when fetching a remote url with Cookie, if it get a Location response header, it will follow that url and try to fetch that url with provided cookie. This can lead to forwarding secure headers to 3th party.

Remediation

Upgrade node-fetch to version 2.6.7, 3.1.1 or higher.

References

medium severity

Information Exposure

  • Vulnerable module: apollo-server-core
  • Introduced through: apollo-server-express@1.4.0

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api apollo-server-express@1.4.0 apollo-server-core@1.4.0

Overview

apollo-server-core is a core module of the Apollo community GraphQL Server.

Affected versions of this package are vulnerable to Information Exposure in the request handling process. An attacker can infer sensitive information about server responses by issuing specially crafted authenticated GraphQL queries across origins using a browser with a specific CORS implementation bug, allowing them to analyze response times and deduce facts such as whether fields return null or the approximate number of list entries returned from fields.

Note:

This is only exploitable if the server relies on cookies or HTTP Basic Auth for authentication and the attack is performed from a browser affected by the CORS bug.

Workaround

This vulnerability can be mitigated by blocking any HTTP request with a Content-Type header containing message/ from reaching the server, for example by adding middleware or a proxy rule to reject such requests.

Remediation

A fix was pushed into the master branch but not yet published.

References

medium severity
new

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

  • Vulnerable module: uuid
  • Introduced through: graphql-tools@2.24.0

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api graphql-tools@2.24.0 uuid@3.4.0
    Remediation: Upgrade to graphql-tools@3.1.0.

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

Denial of Service (DoS)

  • Vulnerable module: node-fetch
  • Introduced through: isomorphic-fetch@2.2.1

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api isomorphic-fetch@2.2.1 node-fetch@1.7.3
    Remediation: Upgrade to isomorphic-fetch@3.0.0.

Overview

node-fetch is a light-weight module that brings window.fetch to node.js

Affected versions of this package are vulnerable to Denial of Service (DoS). Node Fetch did not honor the size option after following a redirect, which means that when a content size was over the limit, a FetchError would never get thrown and the process would end without failure.

Remediation

Upgrade node-fetch to version 2.6.1, 3.0.0-beta.9 or higher.

References

low severity

Information Exposure

  • Vulnerable module: apollo-server-core
  • Introduced through: apollo-server-express@1.4.0

Detailed paths

  • Introduced through: react-weather-api@rockchalkwushock/react-weather-api apollo-server-express@1.4.0 apollo-server-core@1.4.0
    Remediation: Upgrade to apollo-server-express@2.1.0.

Overview

apollo-server-core is a core module of the Apollo community GraphQL Server.

Affected versions of this package are vulnerable to Information Exposure when it can log sensitive information, such as Studio API keys, if they are passed incorrectly with leading/trailing whitespace or if they have any characters that are invalid as part of a header value.

Note Users are affected only if all the conditions are true:

  • Use either the schema reporting or usage reporting feature.

  • Use an Apollo Studio API key which has invalid header values.

  • Use the default fetcher (node-fetch) or configure their own node-fetch fetcher

Workaround

  1. Try retrieving a new API key from Studio. Note: This may not work if the invalid character is not part of the secret (it may be derived from identifiers like graph name, user name).

  2. Override the fetcher

  3. Disable schema reporting and/or usage reporting

Remediation

Upgrade apollo-server-core to version 2.26.1, 3.12.1 or higher.

References