-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Describe the bug
Issue: Production Source Maps Exposed on Public CDN
Description
I have observed that the okta-signin-widget deployed via oktacdn.com (and potentially other channels) includes full Source Maps (.js.map) alongside minified production assets.
Example:
https://ok7static.oktacdn.com/assets/js/sdk/okta-signin-widget/7.37.1/js/okta-sign-in.min.js.map
This file is publicly accessible and contains the unminified source code, original comments, and file structure of the widget.
Impact
While this project is open source, exposing source maps in production environments used by downstream consumers (like Figma, etc.) increases the attack surface for those applications. It allows attackers to:
- Easily reverse-engineer the exact version and client-side logic being used.
- Debug the authentication flow in real-time against production targets.
- Identify potentially deprecated or vulnerable code paths more rapidly.
Reproduction Steps
Steps to Reproduce
- Navigate to any site using the hosted widget (e.g.,
admin.figma.com). - Inspect the network traffic or source code.
- Append
.mapto theokta-sign-in.min.jsURL. - Observe that the server returns
200 OKwith the full source map.
Suggested Fix
Please disable source map generation for production builds in the Webpack configuration.
File: webpack.common.config.js (or similar)
// Recommendation:
devtool: process.env.NODE_ENV === 'production' ? false : 'source-map'This ensures that while development remains easy, production deployments do not leak source metadata.
SDK Versions
7.37.1
Additional Information
No response