CVE-2023-28444

9.9 CRITICAL

📋 TL;DR

CVE-2023-28444 is an information exposure vulnerability in angular-server-side-configuration where environment variables intended for backend services in monorepo setups could be exposed in the frontend application's index.html file. This affects Angular projects using angular-server-side-configuration version 15.0.0 in monorepo configurations with backend components. The vulnerability allows sensitive backend environment variables to be publicly accessible through the web application.

💻 Affected Systems

Products:
  • angular-server-side-configuration
Versions: Version 15.0.0 only
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects monorepo setups where both frontend and backend code exist in the same project. Plain Angular projects without backend components are NOT affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Sensitive backend credentials, API keys, database connection strings, and other secrets are exposed publicly through the web application, leading to complete system compromise.

🟠

Likely Case

Backend environment variables containing non-critical configuration data are exposed, potentially revealing internal system details and architecture.

🟢

If Mitigated

No exposure occurs as environment variable detection is properly restricted to frontend files only.

🌐 Internet-Facing: HIGH - Exposed environment variables are served directly in index.html, making them accessible to anyone visiting the web application.
🏢 Internal Only: MEDIUM - Even internal applications could expose sensitive backend variables to authenticated users who shouldn't have access to them.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW - No exploitation required, exposed variables are directly accessible in the HTML source.

This is an information exposure vulnerability rather than an active exploit. The sensitive data is already present in the deployed application.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 15.1.0

Vendor Advisory: https://github.com/kyubisation/angular-server-side-configuration/security/advisories/GHSA-gwvm-vrp4-4pp5

Restart Required: Yes

Instructions:

1. Update angular-server-side-configuration to version 15.1.0 or later. 2. Run npm update angular-server-side-configuration. 3. Rebuild and redeploy your Angular application. 4. The new version includes a searchPattern option that restricts environment variable detection by default.

🔧 Temporary Workarounds

Manual ngssc.json configuration

all

Manually create or edit the ngssc.json file to explicitly define which environment variables should be included, preventing automatic detection of backend variables.

Create ngssc.json with explicit variable definitions or edit existing file to remove backend variables

Post-generation script cleanup

all

Run a script after ngssc.json generation to remove any backend environment variables that were incorrectly detected.

Create a script to filter out backend variables from ngssc.json before deployment

🧯 If You Can't Patch

  • Isolate frontend and backend into separate repositories or projects to prevent cross-detection of environment variables.
  • Implement strict Content Security Policies and network segmentation to limit access to the exposed application.

🔍 How to Verify

Check if Vulnerable:

Check if using angular-server-side-configuration version 15.0.0 in a monorepo setup, then inspect the deployed index.html for exposed environment variables that should only be in backend.

Check Version:

npm list angular-server-side-configuration

Verify Fix Applied:

Verify angular-server-side-configuration version is 15.1.0 or later, and check that backend environment variables no longer appear in the deployed index.html.

📡 Detection & Monitoring

Log Indicators:

  • Unusual access patterns to index.html or configuration endpoints

Network Indicators:

  • HTTP requests specifically targeting index.html source inspection

SIEM Query:

Search for web server logs showing repeated GET requests to index.html with user agents suggesting source code inspection.

🔗 References

📤 Share & Export