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-2021-22707 Multiple Schneider Electric EVlink Charging Stations 信任管理问题漏洞 — EVlink City (EVC1S22P4 / EVC1S7P4 all versions prior to R8 V3.4.0.1), EVlink Parking (EVW2 / EVF2 / EV.2 all versions prior to R8 V3.4.0.1), and EVlink Smart Wallbox (EVB1A all versions prior to R8 V3.4.0.1 ) 9.8 - 2021-07-21
CVE-2020-5349 Dell EMC Networking S4100 和 S5200 信任管理问题漏洞 — Networking 9.8 Critical 2021-07-19
CVE-2021-35961 TAIWAN SECOM CO., LTD., Door Access Control and Personnel Attendance Management system - Use of Hard-coded Credentials — Door Access Control and Personnel Attendance Management system 9.8 Critical 2021-07-16
CVE-2021-21820 D-LINK DIR-3040 信任管理问题漏洞 — D-Link 9.8 - 2021-07-16
CVE-2021-0279 Contrail Cloud: Hardcoded credentials for RabbitMQ service — Contrail Cloud 8.6 High 2021-07-15
CVE-2021-32535 QSAN SANOS - Use of Hard-coded Credentials — SANOS 9.8 Critical 2021-07-07
CVE-2021-31505 Arlo Q Plus 信任管理问题漏洞 — Q Plus 6.8 - 2021-06-29
CVE-2021-33540 Phoenix Contact: Undocumented FTP acces in certain AXL F BK and IL BK devices — AXL F BK 7.3 High 2021-06-25
CVE-2021-33531 WEIDMUELLER: WLAN devices affected by Hard-coded Credentials vulnerability — IE-WL(T)-BL-AP-CL-XX 8.8 High 2021-06-25
CVE-2021-33529 WEIDMUELLER: WLAN devices affected by Hard-coded Credentials vulnerability — IE-WL(T)-BL-AP-CL-XX 7.5 High 2021-06-25
CVE-2021-34812 Synology Calendar 信任管理问题漏洞 — Synology Calendar 5.8 Medium 2021-06-18
CVE-2021-31477 GE Reason RPV311 信任管理问题漏洞 — Reason RPV311 9.8 - 2021-06-16
CVE-2020-1716 Red Hat ceph-ansible 信任管理问题漏洞 — ceph-ansible 8.8 - 2021-05-28
CVE-2021-32454 SITEL CAP/PRX hardcoded credentials — CAP/PRX 9.6 Critical 2021-05-17
CVE-2021-20025 SonicWall Email Security Appliance 信任管理问题漏洞 — Email Security Virtual Appliance 8.4 - 2021-05-13
CVE-2021-27437 Advantech WISE-PaaS/RMM 信任管理问题漏洞 — WISE-PaaS/RMM 7.5 - 2021-05-07
CVE-2021-30165 EDIMAX Technology Co., Ltd. HD Wireless Day & Night Network Camera IC-3140W - Hard-coded password — IC-3140W 7.5 High 2021-04-27
CVE-2021-0248 NFX Series: Hard-coded credentials allow an attacker to take control of any instance through administrative interfaces. — Junos OS 10.0 Critical 2021-04-22
CVE-2021-0245 Junos OS: Junos Fusion: Hard-coded credentials on satellite devices allows a locally authenticated attacker to elevate their privileges. — Junos OS 7.8 High 2021-04-22
CVE-2020-27278 Hamilton-medical Hamilton-T1 信任管理问题漏洞 — Hamilton Medical AG, T1-Ventillator 6.8 - 2021-03-15
CVE-2021-22667 Advantech BB-ESWGP506-2SFP-T 信任管理问题漏洞 — BB-ESWGP506-2SFP-T 9.8 - 2021-02-24
CVE-2020-6779 Hard-coded Credentials in the Database of Bosch FSM-2500 Server and Bosch FSM-5000 Server — FSM-2500 10.0 Critical 2021-01-25
CVE-2021-1219 Cisco Smart Software Manager Satellite Static Credential Vulnerability — Cisco Smart Software Manager On-Prem 7.8 - 2021-01-20
CVE-2020-27256 多款Sooil产品信任管理问题漏洞 — SOOIL Developments Co., Ltd Diabecare RS, AnyDana-i and AnyDana-A 6.1 - 2021-01-19
CVE-2020-12501 Pepperl+Fuchs improper authorization affects multiple Comtrol RocketLinx products — P+F Comtrol RocketLinx 9.8 Critical 2020-10-15
CVE-2020-3446 Cisco vWAAS for Cisco ENCS 5400-W Series and CSP 5000-W Series Default Credentials Vulnerability — Cisco Wide Area Application Services (WAAS) 9.8 - 2020-08-26
CVE-2020-3382 Cisco Data Center Network Manager Authentication Bypass Vulnerability — Cisco Data Center Network Manager 9.8 - 2020-07-31
CVE-2020-7515 Schneider Electric Easergy Builder 信任管理问题漏洞 — Easergy Builder V1.4.7.2 and prior 8.8 - 2020-07-23
CVE-2020-3330 Cisco Small Business RV110W Wireless-N VPN Firewall Static Default Credential Vulnerability — Cisco RV110W Wireless-N VPN Firewall Firmware 9.8 - 2020-07-16
CVE-2020-10269 RVD#2566: Hardcoded Credentials on MiRX00 wireless Access Point — MiR100 9.8 - 2020-06-24

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