/

CVE-2026-50083

Severity:

CRITICAL RISK

(9.1)

Hard-coded OAuth Credentials (CWE-798) in Aqara IAM

CVE-2026-50083

Analyzed

Vulnerability type

Category:

Hard-coded Credentials

CWE:

CWE-798

Impact:

Authentication Bypass and Account Compromise

Severity:

CRITICAL RISK

(9.1)

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

The Aqara IAM/SSO Gateway (gw-builder.aqara.com) exposes a hardcoded OAuth client credential that can be abused by anyone who discovers it.

Under typical OAuth trust assumptions, this allows attackers to impersonate legitimate clients and, when chained with related flaws, can contribute to fully unauthenticated remote takeover of affected devices.

Affected context

This vulnerability occurs in the Aqara IAM/SSO Gateway where OAuth client authentication relies on a static, embedded client credential rather than a per-deployment or secret-managed value.

It becomes relevant in environments where the gateway is reachable over the internet and other trust decisions (such as token issuance, device binding, or management APIs) rely on the authenticity of the OAuth client identity.

The risk is amplified when the same hardcoded credential is shared across multiple tenants, environments, or device fleets, effectively collapsing isolation between them.

Exploit preconditions

  • Attack surface: Public-facing Aqara IAM/SSO Gateway endpoint (gw-builder.aqara.com) or any service that trusts its OAuth client identity.
  • Required access: No prior authentication is required if the attacker can obtain or reverse-engineer the hardcoded OAuth client credential.
  • Trigger point: Any OAuth flow, token endpoint, or API operation that authenticates the client based on the static credential.
  • Why exploitation is possible: The client credential is hardcoded and shared, so knowledge of that static secret is sufficient to impersonate trusted clients across environments without detection or per-tenant isolation.

Why this happens

The underlying issue is the use of a fixed, hardcoded OAuth client credential in application code or configuration, aligning with CWE-798: Use of Hard-coded Credentials.

Instead of being generated, rotated, and stored via a secure secret-management mechanism, the credential is static and likely identical for all deployments using that component.

This design breaks the core assumption that a client credential is secret and unique; once discovered, it enables attackers to authenticate as a legitimate client indefinitely, bypassing normal access controls that rely on client identity.

Potential impact

  • Attackers may impersonate trusted OAuth clients and obtain access tokens.
  • Adversaries could call privileged IAM/SSO APIs that are supposed to be restricted to backend services.
  • Cross-tenant or cross-device data exposure and unauthorized configuration changes may be possible.
  • In conjunction with other vulnerabilities, the issue can contribute to fully unauthenticated remote takeover of affected devices.
  • Long-lived compromise risk due to difficulty detecting misuse of a shared credential.

General mitigation guidance

Effective mitigation focuses on eliminating static, embedded secrets and tightening trust boundaries around client authentication:

  • Replace hardcoded OAuth client credentials with per-environment, per-tenant secrets managed by a dedicated secret-management system.
  • Generate unique client credentials for each deployment or device fleet, and design the system so credentials can be rotated without code changes.
  • Enforce strict least-privilege scopes for OAuth clients so that compromise of one client identity limits blast radius.
  • Prefer stronger, asymmetric client authentication patterns (such as mTLS or signed assertions) where keys are stored securely and can be rotated.
  • Reduce implicit trust in client identity alone by layering additional checks (e.g., device binding, IP or domain-level controls, and anomaly detection) around sensitive IAM/SSO operations.

How teams detect issues like this

Organizations can detect and manage this class of issue through a combination of code, configuration, and behavioral analysis:

  • Use static analysis and secret-scanning rules to flag embedded client IDs, client secrets, and OAuth credentials in code repositories and build artifacts.
  • Introduce secure coding guidelines and code review checklists that explicitly prohibit hardcoded credentials and require use of secret-management APIs.
  • Implement configuration and policy checks (e.g., in CI/CD pipelines) that validate OAuth client definitions are externalized and environment-specific.
  • Monitor authentication logs for unusual or widespread reuse of the same client identity across many IPs, tenants, or geographies, which may indicate shared credential abuse.
  • Periodically audit deployed services for configuration drift, ensuring runtime instances are not still using legacy static credentials.

Sources

SourceLink
github.comgithub.com/xn0tsa/theres-no-place-like-home
runzero.comrunzero.com/advisories/aqara-hardcoded-oauth-cve-2026-50083

Frequently asked

questions

Yes. If the Aqara IAM/SSO Gateway is exposed over the network and the hardcoded OAuth client credential is known or can be derived, an attacker can remotely impersonate the trusted client without local access.

Not necessarily. The vulnerability centers on client authentication, not user authentication, so knowledge of the hardcoded client credential can allow unauthenticated access to client-level privileges and token issuance paths.

Remove all hardcoded credentials from code and images, move OAuth client secrets into a dedicated secret-management system, and ensure each environment or tenant has unique, rotatable credentials with minimal required privileges.

Adopt a "no secrets in code" policy, enforce it via automated secret scanning and code review, standardize use of secure secret-management APIs, and design authentication flows to rely on unique, least-privilege, and regularly rotated credentials rather than shared static values.

Find out what's already
exploitable in your codebase.