Summary
Certain Milesight AIoT camera firmware versions embed hard-coded credentials directly into the device software, creating a universal access path that cannot be changed by end users.
An attacker who can reach the device over the network may be able to authenticate using these fixed credentials, bypass normal account controls, and gain privileged access to camera functions and configuration.
Affected context
This vulnerability occurs in specific Milesight AIoT camera firmware builds where default or vendor-backdoor credentials are compiled into the firmware image.
It is relevant in environments where cameras are reachable over local networks or the internet and where network segmentation, strong access control, or device-level hardening is limited.
The risk is higher when devices are directly exposed to the public internet, share common passwords across deployments, or rely solely on application-layer authentication without additional network defenses.
Exploit preconditions
- Attack surface: Network-accessible management or service interfaces exposed by the camera (e.g., web UI, API, RTSP/ONVIF, proprietary services).
- Required access: Ability to initiate network connections to the device's listening ports (local network or remote if exposed via port forwarding, VPN misconfiguration, or cloud relay).
- Authentication state: The hard-coded credentials are accepted by the device as valid, often with elevated privileges, independent of user-configured accounts.
- Why exploitation is possible: Credentials are statically embedded in firmware and are either documented or trivially discoverable (e.g., via firmware extraction, leaked documentation, or shared across devices), allowing attackers to log in without needing unique per-device secrets.
Why this happens
The underlying issue maps to CWE-798: Use of Hard-Coded Credentials, where authentication secrets are embedded directly within the firmware as constant values.
This pattern emerges when developers bake default administrative passwords, support accounts, or maintenance backdoors into the device to simplify deployment, testing, or remote servicing.
Because these secrets are not generated per device and cannot be rotated or disabled by operators, compromise of a single credential effectively compromises any device sharing that firmware and interface exposure pattern.
The firmware architecture places long-term trust in static values rather than relying on user-provisioned or hardware-bound keys, creating a systemic, persistent authentication weakness.
Potential impact
- Unauthorized access to camera live video streams and stored recordings
- Full administrative control over camera configuration, including network settings and firmware management
- Enrollment of devices into botnets for distributed denial-of-service (DDoS) attacks or scanning campaigns
- Use of the camera as an internal pivot point for further attacks within the local network
- Tampering with security monitoring by disabling cameras, altering fields of view, or erasing logs and recordings
- Loss of privacy and potential regulatory or contractual non-compliance due to unapproved surveillance access
General mitigation guidance
Effective mitigation focuses on eliminating static, shared secrets and reducing the exposed attack surface around device management.
Common defensive patterns include:
- Designing firmware so that no universal or hard-coded administrative credentials exist; rely on per-device, user-provisioned secrets instead.
- Enforcing secure onboarding flows that require setting a unique strong password or key at first use, blocking operation until completed.
- Implementing mechanisms to disable or lock down any support or maintenance accounts in production deployments, ideally controlled by configuration flags or build-time options.
- Applying strong network-layer protections such as restricting management interfaces to dedicated management networks or VPN-only access.
- Using role- and least-privilege-based access controls so that any necessary service accounts have minimal permissions and are auditable.
- Favoring cryptographically strong, hardware-bound identity mechanisms (device certificates, TPM/secure element-backed keys) over password-like secrets for remote administration.
How teams detect issues like this
Identifying hard-coded credentials typically involves a mix of firmware analysis, behavioral testing, and configuration review.
Common approaches include:
- Static analysis of firmware images: Extracting and scanning binaries, configuration files, and scripts for known username/password patterns, authentication tokens, or embedded keys.
- Code review signals: Looking for literal credential strings, embedded hashes, or conditional logic that recognizes undocumented accounts or bypasses password checks.
- Dynamic testing: Attempting authentication with default or known vendor credentials across fleets of devices, especially using security scanning tools tailored for IoT and camera systems.
- Policy enforcement: Establishing development policies disallowing hard-coded credentials, with automated checks in CI pipelines that flag suspicious constants or authentication shortcuts.
- Runtime monitoring: Logging and analyzing successful logins, particularly from unusual accounts or across large populations of devices using the same credential pattern.

