/

CVE-2026-126802

Severity:

HIGH RISK

(8.2)

Hardcoded Credentials (CWE-798) in NextScan ns-admin

CVE-2026-126802

Deferred

Vulnerability type

Category:

Hardcoded Credentials

CWE:

CWE-798

Impact:

Unauthorized API access, sensitive information disclosure, and scan-node impersonation

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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/config could 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.

Sources

SourceLink
github.comgithub.com/tongcheng-security-team/NextScan/issues/50
hub.docker.comhub.docker.com/r/lysec/ns-admin
vul.yulun.ac.cnvul.yulun.ac.cn/20261107/nextscan/
vulncheck.comvulncheck.com/advisories/nextscan-1.1.0-through-1.2.0-hardcoded-credentials-in-ns-admin-agent-and-external-apis

Frequently asked

questions

It may be exploitable by an unauthenticated attacker who can reach the affected ns-admin API endpoints over the network.

According to the description, valid credentials are not required. Network reachability to the exposed endpoints is the key condition.

Remove hardcoded credentials, use securely managed and rotatable authentication, and enforce authorization on each protected endpoint.

Use secret scanning and code review to catch embedded credentials, enforce authentication policies in CI, and regularly audit API exposure and access logs.

Find out what's already
exploitable in your codebase.