VariantDraft

CWE-259Use of Hard-coded Password

Category: auth

Description

The product contains a hard-coded password, which it uses for its own inbound authentication or for outbound communication to external components.

Common consequences· 2

  • Access Control — Gain Privileges or Assume Identity
    If hard-coded passwords are used, it is almost certain that malicious users can gain access through the account in question.
  • Access Control — Gain Privileges or Assume Identity, Hide Activities, Reduce Maintainability
    A hard-coded password typically leads to a significant authentication failure that can be difficult for the system administrator to detect. Once detected, it can be difficult to fix, so the administrator may be forced into disabling the product entirely.

Potential mitigations· 5

  • [Architecture and Design]For outbound authentication: store passwords outside of the code in a strongly-protected, encrypted configuration file or database that is protected from access by all outsiders, including other local users on the same system. Properly protect the key (CWE-320). If you cannot use encryption to protect the file, then make sure that the permissions are as restrictive as possible.
  • [Architecture and Design]For inbound authentication: Rather than hard-code a default username and password for first time logins, utilize a "first login" mode that requires the user to enter a unique strong password.
  • [Architecture and Design]Perform access control checks and limit which entities can access the feature that requires the hard-coded password. For example, a feature might only be enabled through the system console instead of through a network connection.
  • [Architecture and Design]
  • [Architecture and Design]

References

  1. https://cwe.mitre.org/data/definitions/259.html

Compliance frameworks addressing this (incoming)3

TypeTargetConfidenceTier
ComplianceControlcis_v8-5100%live
ComplianceControlcis_v8-6100%live
ComplianceControliso27001-a.8.5100%live

(incoming)29

TypeTargetConfidenceTier
VulnerabilityCVE-2025-1100cve-2025-11000%live
VulnerabilityCVE-2025-11126cve-2025-111260%live
VulnerabilityCVE-2025-11643cve-2025-116430%live
VulnerabilityCVE-2025-14126cve-2025-141260%live
VulnerabilityCVE-2025-15111cve-2025-151110%live
VulnerabilityCVE-2025-20286cve-2025-202860%live
VulnerabilityCVE-2025-2322cve-2025-23220%live
VulnerabilityCVE-2025-2402cve-2025-24020%live
VulnerabilityCVE-2025-25428cve-2025-254280%live
VulnerabilityCVE-2025-27638cve-2025-276380%live
VulnerabilityCVE-2025-30106cve-2025-301060%live
VulnerabilityCVE-2025-30115cve-2025-301150%live
VulnerabilityCVE-2025-44955cve-2025-449550%live
VulnerabilityCVE-2025-46067cve-2025-460670%live
VulnerabilityCVE-2025-54754cve-2025-547540%live
VulnerabilityCVE-2025-59388cve-2025-593880%live
VulnerabilityCVE-2025-70041cve-2025-700410%live
VulnerabilityCVE-2025-7079cve-2025-70790%live
VulnerabilityCVE-2025-70798cve-2025-707980%live
VulnerabilityCVE-2025-70802cve-2025-708020%live
VulnerabilityCVE-2025-8730cve-2025-87300%live
VulnerabilityCVE-2025-8974cve-2025-89740%live
VulnerabilityCVE-2025-9725cve-2025-97250%live
VulnerabilityCVE-2026-1610cve-2026-16100%live
VulnerabilityCVE-2026-25753cve-2026-257530%live
VulnerabilityCVE-2026-2616cve-2026-26160%live
VulnerabilityCVE-2026-4475cve-2026-44750%live
VulnerabilityCVE-2026-7251cve-2026-72510%live
KEVEntryZoho ManageEngine ADSelfService Plus Remote Code Execution Vulnerabilitykev-cve-2022-288100%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Use of Hard-coded Credentials
CWE
Use of Weak Credentials
CWE
Use of Hard-coded Cryptographic Key
CWE
Insufficiently Protected Credentials
CWE
Password in Configuration File
CWE
Use of Default Password
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.