In most cases, trust boundaries are violated when a secret is exposed in a source code repository or an uncontrolled deployment environment.
Unintended people who don’t need to know the secret might get access to it. They might then be able to use it to gain unwanted access to associated
services or resources.
The trust issue can be more or less severe depending on the people’s role and entitlement.
What is the potential impact?
Cryptographic private key disclosure
A cryptographic private key is a piece of sensitive information that is used in asymmetric cryptography. They are used in conjunction with public
keys to secure communications and authenticate digital signatures.
Private keys can be used to achieve two main cryptographic operations, encryption or digital signature. Those operations are the basis of multiple
higher-level security mechanisms such as:
- User authentication
- Servers authentication, for example in the X509 trust model
- Email encryption
Disclosing a cryptographic private key to an unintended audience can have severe security consequences. The exact impact will vary depending on the
role of the key and the assets it protects.
For example, if the key is used in conjunction with an X509 certificate to authenticate a web server as part of TLS communications, attackers with
network access will be able to impersonate that server. This leads to Man-In-The-Middle-Attacks that would affect both the confidentiality and
integrity of the communications from clients to that server.
If the key was used as part of email protocols, attackers might be able to send emails on behalf of the key owner or decrypt previously encrypted
emails. This might lead to sensitive information disclosure and reputation loss.
Supply chain attacks
If the leaked secret gives an attacker the ability to publish code to private packages or repositories under the name of the organization, then
there may exist grave consequences beyond the compromise of source code. The attacker may inject malware, backdoors, or other harmful code into these
private repositories.
This can cause further security breaches inside the organization, but will also affect clients if the malicious code gets added to any products.
Distributing code that (unintentionally) contains backdoors or malware can lead to widespread security vulnerabilities, reputational damage, and
potential legal liabilities.
If a third party gets access to a keystore containing an Android upload key or app signing key, this person could sign and distribute malicious
apps under the same identity as the original app.