Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CWE-798 (使用硬编码的凭证) — Vulnerability Class 684

684 vulnerabilities classified as CWE-798 (使用硬编码的凭证). AI Chinese analysis included.

CWE-798 represents a critical security weakness where authentication mechanisms rely on static, embedded credentials rather than dynamic verification. This flaw typically manifests as default administrative accounts with simple, hard-coded passwords or cryptographic keys stored directly within the source code or configuration files. Attackers exploit this vulnerability by scanning for these predictable credentials, gaining immediate, unauthorized access to sensitive systems without needing to bypass complex security controls. To mitigate this risk, developers must eliminate static secrets entirely, implementing robust credential management solutions such as secure vaults, environment variables, or hardware security modules. Additionally, enforcing strong password policies, regular key rotation, and multi-factor authentication ensures that access rights are dynamic and secure, significantly reducing the attack surface against unauthorized entry.

MITRE CWE Description
The product contains hard-coded credentials, such as a password or cryptographic key. There are two main variations: Inbound: the product contains an authentication mechanism that checks the input credentials against a hard-coded set of credentials. In this variant, a default administration account is created, and a simple password is hard-coded into the product and associated with that account. This hard-coded password is the same for each installation of the product, and it usually cannot be changed or disabled by system administrators without manually modifying the program, or otherwise patching the product. It can also be difficult for the administrator to detect. Outbound: the product connects to another system or component, and it contains hard-coded credentials for connecting to that component. This variant applies to front-end systems that authenticate with a back-end service. The back-end service may require a fixed password that can be easily discovered. The programmer may simply hard-code those back-end credentials into the front-end product.
Common Consequences (2)
Access Control Bypass Protection Mechanism
If hard-coded passwords are used, it is almost certain that malicious users will gain access to the account in question. Any user of the product that hard-codes passwords may be able to extract the password. Client-side systems with hard-coded passwords pose even more of a threat, since the extracti…
Integrity, Confidentiality, Availability, Access Control, Other Read Application Data, Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands, Other
This weakness can lead to the exposure of resources or functionality to unintended actors, possibly providing attackers with sensitive information or even execute arbitrary code. If the password is ever discovered or published (a common occurrence on the Internet), then anybody with knowledge of thi…
Mitigations (5)
Architecture and Design For outbound authentication: store passwords, keys, and other credentials 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 …
Architecture and Design For inbound authentication: Rather than hard-code a default username and password, key, or other authentication credentials for first time logins, utilize a "first login" mode that requires the user to enter a unique strong password or key.
Architecture and Design If the product must contain hard-coded credentials or they cannot be removed, perform access control checks and limit which entities can access the feature that requires the hard-coded credentials. For example, a feature might only be enabled through the system console instead of through a network connection.
Architecture and Design For inbound authentication using passwords: apply strong one-way hashes to 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 handling an incoming password during authentication, take the hash of the password and compare it to the saved hash. Use ra…
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 or keys that 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 or keys should be limited at th…
Examples (2)
The following code uses a hard-coded password to connect to a database:
... DriverManager.getConnection(url, "scott", "tiger"); ...
Bad · Java
javap -c ConnMngr.class 22: ldc #36; //String jdbc:mysql://ixne.com/rxsql 24: ldc #38; //String scott 26: ldc #17; //String tiger
Attack
The following code is an example of an internal hard-coded password in the back-end:
int VerifyAdmin(char *password) { if (strcmp(password, "Mew!")) { printf("Incorrect Password!\n"); return(0) } printf("Entering Diagnostic Mode...\n"); return(1); }
Bad · C
int VerifyAdmin(String password) { if (!password.equals("Mew!")) { return(0) } //Diagnostic Mode return(1); }
Bad · Java
CVE ID Title CVSS Severity Published
CVE-2025-1393 Weidmueller: Authentication Vulnerability due to Hard-coded Credentials — PROCON-WIN 9.8 Critical 2025-03-05
CVE-2025-1879 i-Drive i11/i12 APK hard-coded credentials — i11 2.4 Low 2025-03-03
CVE-2024-9334 Information Disclosure in E-Kent's Pallium Vehicle Tracking — Pallium Vehicle Tracking 8.2 High 2025-02-27
CVE-2024-52902 IBM Cognos Controller information disclosure — Cognos Controller 8.8 High 2025-02-19
CVE-2024-8893 GoodWe GW1500-XS 安全漏洞 — GW1500‑XS 7.3 High 2025-02-14
CVE-2025-26410 Weak Hard-coded Credentials — Wattsense Bridge 9.8 - 2025-02-11
CVE-2025-1143 Billion Electric M120N - Use of Hard-coded Credentials — M100 8.4 High 2025-02-11
CVE-2024-51547 Credentials Disclosure - keys — ASPECT-Enterprise 9.8 Critical 2025-02-06
CVE-2024-55927 Flawed token generation implementation & Hard-coded key implementation — Xerox Workplace Suite 7.6 High 2025-01-23
CVE-2024-11147 ECOVACS lawnmowers and vacuums deterministic root password — Unspecified robots 7.6 High 2025-01-23
CVE-2024-45832 Ossur Mobile Logic Application Use of Hard-coded Credentials — Mobile Logic Application 4.3 Medium 2025-01-17
CVE-2024-28778 IBM Cognos Controller information disclosure — Controller 6.5 Medium 2025-01-07
CVE-2024-28146 Hardcoded credentials — Scan2Net 9.8 - 2024-12-12
CVE-2024-45319 SonicWALL SMA100 安全漏洞 — SMA100 6.5 - 2024-12-05
CVE-2024-41777 IBM Cognos Controller hard coded credentials — Cognos Controller 7.5 High 2024-12-03
CVE-2024-49806 IBM Security Verify Access Appliance hard coded credentials — Security Verify Access 9.4 Critical 2024-11-29
CVE-2024-49805 IBM Security Verify Access Appliance hard coded credentials — Security Verify Access 9.4 Critical 2024-11-29
CVE-2024-36248 Sharp MFP 安全漏洞 — Multiple MFPs (multifunction printers) 9.1 Critical 2024-11-26
CVE-2024-35244 Sharp MFP 安全漏洞 — Multiple MFPs (multifunction printers) 9.1 Critical 2024-11-26
CVE-2024-10451 Org.keycloak:keycloak-quarkus-server: sensitive data exposure in keycloak build process — Red Hat build of Keycloak 24 5.9 Medium 2024-11-25
CVE-2024-11630 E-Lins H685/H685f/H700/H720/H750/H820/H820Q/H820Q0/H900 OEM Backend hard-coded credentials — H685 7.3 High 2024-11-22
CVE-2023-51638 Allegra Hard-coded Credentials Authentication Bypass Vulnerability — Allegra 9.8 - 2024-11-22
CVE-2024-49060 Azure Stack HCI Elevation of Privilege Vulnerability — Azure Stack HCI OS 8.8 High 2024-11-15
CVE-2024-48971 Clinician Password and Serial Number Clinician Password are hard-coded in Life2000 Ventilator — Life2000 Ventilation System 9.3 Critical 2024-11-14
CVE-2024-52295 DataEase has a forged JWT token vulnerability — dataease 9.8AI Critical AI 2024-11-13
CVE-2024-7295 Hard-coded credentials used for temporary and cache data encryption — Telerik Report Server 7.1 High 2024-11-13
CVE-2024-50593 Hardcoded Service Password — Elefant 6.7 - 2024-11-08
CVE-2024-28875 LevelOne WBR-6012 信任管理问题漏洞 — WBR-6012 8.1 High 2024-10-30
CVE-2024-31151 LevelOne WBR-6012 信任管理问题漏洞 — WBR-6012 8.1 High 2024-10-30
CVE-2024-45656 IBM Flexible Service Processor hard coded credentials — Flexible Service Processor 9.8 Critical 2024-10-29

Vulnerabilities classified as CWE-798 (使用硬编码的凭证) represent 684 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.