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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

559 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 ControlBypass 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, OtherRead 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 DesignFor 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 DesignFor 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 DesignIf 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 DesignFor 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 DesignFor 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 IDTitleCVSSSeverityPublished
CVE-2020-3234 Cisco IOS Software for Cisco Industrial Routers Virtual Device Server Static Credentials Vulnerability — Cisco IOS 12.2(60)EZ16 8.8 -2020-06-03
CVE-2020-5248 Public GLPIKEY can be used to decrypt any data in GLPI — glpi 7.2 High2020-05-12
CVE-2020-3301 Cisco Firepower Management Center Static Credential Vulnerabilities — Cisco Firepower Management Center 7.8 -2020-05-06
CVE-2020-3318 Cisco Firepower Management Center Static Credential Vulnerabilities — Cisco Firepower Management Center 7.8 -2020-05-06
CVE-2019-5622 Accellion File Transfer Appliance Use of Hard-coded Credentials — File Transfer Appliance 9.8 -2020-04-29
CVE-2019-6859 多款Schneider Electric产品信任管理问题漏洞 — Modicon Controllers (All versions of the following CPUs and Communication Module product references listed in the Security Notifications) 7.5 -2020-04-22
CVE-2019-19108 B&R Automation Runtime SNMP Authentication and Authorization Weakness — Automation Runtime 9.4 Critical2020-04-20
CVE-2020-1614 NFX250 Series: Hardcoded credentials in the vSRX VNF instance. — Juniper Networks NFX Series Network Services Platform 10.0 Critical2020-04-08
CVE-2020-1615 Junos OS: vMX: Default credentials supplied in vMX configuration — Junos OS 9.8 Critical2020-04-08
CVE-2019-13559 GE Mark VIe Controller 信任管理问题漏洞 — GE Mark VIe Controller 7.8 -2020-04-07
CVE-2020-6981 Moxa EDS-G516E和EDS-510E 信任管理问题漏洞 — Moxa EDS-G516E Series firmware, Version 5.2 or lower 9.8 -2020-03-24
CVE-2020-6985 Moxa PT-7528和PT-7828 信任管理问题漏洞 — Moxa PT-7528 series firmware, Version 4.0 or lower, PT-7828 series firmware, Version 3.9 or lower 9.8 -2020-03-24
CVE-2020-8868 Quest Software Foglight Evolve 信任管理问题漏洞 — Foglight Evolve 9.8 -2020-03-23
CVE-2020-3165 Cisco NX-OS Software Border Gateway Protocol MD5 Authentication Bypass Vulnerability — Cisco NX-OS Software 7.5 -2020-02-26
CVE-2019-5139 Moxa AWK-3131A 信任管理问题漏洞 — Moxa 7.7 -2020-02-25
CVE-2020-3158 Cisco Smart Software Manager On-Prem Static Default Credential Vulnerability — Cisco Smart Software Manager On-Prem 9.1 -2020-02-19
CVE-2020-5222 Hard-Coded Key Used For Remember-me Token in OpenCast — opencast 6.8 Medium2020-01-30
CVE-2020-6963 多款GE产品信任管理问题漏洞 — GE CARESCAPE Telemetry Server,ApexPro Telemetry Server,CARESCAPE Central Station,Clinical Information Center systems,CARESCAPE B450,B650,B850 Monitors 10.0 -2020-01-24
CVE-2019-9493 MyCar Controls uses hard-coded credentials — MyCar Controls 6.5 Medium2020-01-15
CVE-2019-10995 ABB CP651 HMI 信任管理问题漏洞 — ABB CP651 HMI products 8.8 -2020-01-14
CVE-2019-15977 Cisco Data Center Network Manager Authentication Bypass Vulnerabilities — Cisco Data Center Network Manager 9.8 -2020-01-06
CVE-2019-15975 Cisco Data Center Network Manager Authentication Bypass Vulnerabilities — Cisco Data Center Network Manager 9.8 -2020-01-06
CVE-2019-15976 Cisco Data Center Network Manager Authentication Bypass Vulnerabilities — Cisco Data Center Network Manager 9.8 -2020-01-06
CVE-2019-13543 Medtronic Valleylab FT10 and FX8 Use of Hard-coded Credentials — Valleylab Exchange Client 5.8 Medium2019-11-08
CVE-2019-13553 Rittal Chiller SK 3232-Series 信任管理问题漏洞 — Rittal Chiller SK 3232-Series 9.1 -2019-10-25
CVE-2019-13657 Broadcom CA Performance Management 信任管理问题漏洞 — CA Performance Management 9.8 Critical2019-10-17
CVE-2019-13658 Broadcom CA Network Flow Analysis 信任管理问题漏洞 — CA Network Flow Analysis 9.8 Critical2019-10-02
CVE-2019-11898 Bosch Access Professional Edition 信任管理问题漏洞 — Access Professional Edition 10.0 -2019-09-12
CVE-2019-1935 Cisco Integrated Management Controller Supervisor, Cisco UCS Director, and Cisco UCS Director Express for Big Data SCP User Default Credentials Vulnerability — Cisco Unified Computing System Director 9.8 -2019-08-21
CVE-2019-1919 Cisco FindIT Network Management Software Static Credentials Vulnerability — Cisco FindIT Network Manager 7.8 -2019-07-17

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