Summary
NextScan's ns-admin component contains hardcoded HTTP Basic Auth credentials in its AuthAgent and AuthExternal routers, which can let unauthenticated attackers access protected APIs. Access to these endpoints may expose sensitive infrastructure details and enable attackers to impersonate scan nodes.
Affected context
The issue affects NextScan versions 1.1.0 through 1.2.0 in the ns-admin AuthAgent and AuthExternal routers. It becomes risky when these routers are reachable by an attacker and accept embedded Basic Auth credentials without requiring independently managed authentication.
Exploit preconditions
- Attack surface: HTTP APIs served by the ns-admin AuthAgent and AuthExternal routers
- Required access: Network reachability to the relevant endpoints; the description indicates authentication is not required
- Trigger point: Requests to protected configuration, registration, heartbeat, or logging endpoints
- Why exploitation is possible: Hardcoded credentials can allow access to APIs that should require valid, controlled authentication
Why this happens
The routers rely on hardcoded HTTP Basic Auth credentials to protect API access. Credentials embedded in application code or configuration are difficult to rotate and may be shared or discoverable, undermining authentication boundaries. This maps to CWE-798: Use of Hard-coded Credentials.
Potential impact
- Attackers may access protected APIs without valid user credentials.
- Requests to
/agent/configcould disclose Redis passwords, etcd details, or the server token. - Attackers could impersonate scan nodes through registration, heartbeat, or logging endpoints.
- Exposed secrets could enable further access to connected services or systems.
General mitigation guidance
Defensive patterns include removing embedded credentials and using securely managed, rotatable credentials or short-lived identity-based authentication. Require authentication and authorization for every protected endpoint, and expose only the minimum API surface necessary. Treat configuration and service credentials as sensitive, restrict their access, and rotate secrets that may have been exposed. Apply least privilege to service identities and use secure-by-default settings that deny access unless explicitly authorized.
How teams detect issues like this
- Use static analysis and secret-scanning rules to identify credentials embedded in source code, configuration, or build artifacts.
- Review authentication middleware and route definitions for shared credentials, bypasses, and endpoints lacking per-request authorization.
- Audit API access logs for unexpected calls to configuration, registration, heartbeat, and logging endpoints.
- Enforce CI policies that block committed secrets and require explicit authentication and authorization checks for protected routes.

