Skip to content
OpenAdvisories

Weakness (CWE)

CWE-259: Use of Hard-coded Password

Variant Draft

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

How to prevent it (5 mitigations)
  1. 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.

  2. 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.

  3. 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.

  4. Architecture and Design

    For inbound authentication: apply strong one-way hashes to your passwords and store those hashes in a configuration file or database with appropriate access control. That way, theft of the file/database still requires the attacker to try to crack the password. When receiving an incoming password during authentication, take the hash of the password and compare it to the hash that you have saved.

    Use randomly assigned salts for each separate hash that you generate. This increases the amount of computation that an attacker needs to conduct a brute-force attack, possibly limiting the effectiveness of the rainbow table method.

  5. Architecture and Design

    For front-end to back-end connections: Three solutions are possible, although none are complete.

    The first suggestion involves the use of generated passwords which are changed automatically and must be entered at given time intervals by a system administrator. These passwords will be held in memory and only be valid for the time intervals.

    Next, the passwords used should be limited at the back end to only performing actions valid for the front end, as opposed to having full access.

    Finally, the messages sent should be tagged and checksummed with time sensitive values so as to prevent replay style attacks.

Source: MITRE CWE-259

51 results · Clear filters · Feed

  • Critical 9.8

    The Motorola ACE1000 RTU through 2022-05-02 ships with a hardcoded SSH private key and initialization scripts (such as …

  • Critical 9.8

    SICUNET Access Controller hard-coded password

    A vulnerability was found in SICUNET Access Controller 0.32-05z. It has been classified as very critical. This affects an unknown part. The manipulation leads to weak authentication. It is possible to initiate the attack remotely.

  • Critical 9.8

    Bender Charge Controller: Hardcoded Credentials in Charge Controller

    In Bender/ebee Charge Controllers in multiple versions are prone to Hardcoded Credentials. Bender charge controller CC612 in version 5.20.1 and below is prone to hardcoded ssh credentials. An attacker may use the password to gain administrative access to the …

  • Critical 9.1

    Dell EMC CloudLink 7.1 and all prior versions contain a Hard-coded Password Vulnerability. A remote high privileged att…

  • Critical 9.8

    Moxa MXview Network Management Software

    A use of hard-coded password vulnerability in the Moxa MXview Network Management software Versions 3.x to 3.2.2 may allow an attacker to gain access through accounts using default passwords

  • Critical 9.6

    Insufficiently Protected Credentials Vulnerability in QSW-M2116P-2T2S and QuNetSwitch

    A vulnerability involving insecure storage of sensitive information has been reported to affect QSW-M2116P-2T2S and QNAP switches running QuNetSwitch. If exploited, this vulnerability allows remote attackers to read sensitive information by accessing the unre…

  • Critical 9.1

    QSAN Storage Manager - Use of Hard-coded Password-2

    The same hard-coded password in QSAN Storage Manager's in the firmware allows remote attackers to access the control interface with the administrator’s credential, entering the hard-coded password of the debug mode to execute the restricted system instruction…

  • Critical 9.4

    Default hidden Privileged Account Vulnerability in multiple XEROX devices

    Xerox AltaLink B8045/B8055/B8065/B8075/B8090, AltaLink C8030/C8035/C8045/C8055/C8070 with software releases before 103.xxx.030.32000 includes two accounts with weak hard-coded passwords which can be exploited and allow unauthorized access which cannot be disa…

  • Critical 9.0

    Hospira MedNet Use of Hard-coded Password

    Hospira MedNet before 6.1 uses a hardcoded cleartext password to control SQL database authorization, which allows remote authenticated users to bypass intended access restrictions by leveraging knowledge of this password.

  • Critical 10.0

    Morpho Itemiser 3 Hard-Coded Credential

    Morpho Itemiser 3 8.17 has hardcoded administrative credentials, which makes it easier for remote attackers to obtain access via a login request.

  • Critical 10.0
    CVE-2012-5862 Public exploit EPSS 12%

    Sinapsi eSolar Hard-Coded Password

    These Sinapsi devices store hard-coded passwords in the PHP file of the device. By using the hard-coded passwords in the device, attackers can log into the device with administrative privileges. This could allow the attacker to have unauthorized access.