Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1nd3ZtLXZycDQtNHBwNc4AAyUN

angular-server-side-configuration information disclosure vulnerability in monorepo with node.js backend

Impact

angular-server-side-configuration detects used environment variables in TypeScript (.ts) files during build time of an Angular CLI project. The detected environment variables are written to a ngssc.json file in the output directory.
During deployment of an Angular based app, the environment variables based on the variables from ngssc.json are inserted into the apps index.html (or defined index file).

With version 15 the environment variable detection was widened to the entire project, relative to the angular.json file from the Angular CLI. In a monorepo setup, this could lead to environment variables intended for a backend/service to be detected and written to the ngssc.json, which would then be populated and exposed via index.html.

This has NO IMPACT, in a plain Angular project that has no backend component.

Patches

Vulnerability has been mitigated in 15.1.0, by adding an option searchPattern which restricts the detection file range by default.

# Update via npm
npm update angular-server-side-configuration
## Or more specific
npm install [email protected]

# Update via pnpm
pnpm update angular-server-side-configuration
## Or more specific
pnpm add [email protected]

# Update via yarn
yarn update angular-server-side-configuration
## Or more specific
yarn add [email protected]

Workarounds

Manually edit or create ngssc.json or run a script after ngssc.json generation

References

Permalink: https://github.com/advisories/GHSA-gwvm-vrp4-4pp5
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1nd3ZtLXZycDQtNHBwNc4AAyUN
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: almost 2 years ago
Updated: almost 2 years ago


CVSS Score: 9.9
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L

EPSS Percentage: 0.00147
EPSS Percentile: 0.51187

Identifiers: GHSA-gwvm-vrp4-4pp5, CVE-2023-28444
References: Repository: https://github.com/kyubisation/angular-server-side-configuration
Blast Radius: 10.7

Affected Packages

npm:angular-server-side-configuration
Dependent packages: 3
Dependent repositories: 12
Downloads: 12,855 last month
Affected Version Ranges: >= 15.0.0, < 15.1.0
Fixed in: 15.1.0
All affected versions: 15.0.0, 15.0.1, 15.0.2
All unaffected versions: 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1.0, 0.2.0, 0.2.1, 1.0.0, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 2.0.0, 8.0.0, 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.2.1, 9.0.0, 9.0.1, 9.0.2, 10.0.1, 10.1.0, 10.2.0, 11.0.1, 11.0.2, 12.0.0, 13.0.0, 13.1.0, 13.2.1, 14.0.0, 14.0.1, 15.1.0, 16.0.0, 17.0.1, 17.0.2, 17.0.4, 17.0.5, 18.0.0, 18.0.1, 18.1.0, 18.2.0, 19.0.0, 19.0.1