CVE-2022-20230: CRLF Injection in KeyChainActivity can trick user into disclosing keys in KeyChain
Summary
CVE-2022-20230: In choosePrivateKeyAlias of KeyChain.java, there is a possible access to the user's certificate due to improper input validation. Affects platform/packages/apps/KeyChain across 4 version ranges.
>= 10:0, < 10:2022-07-01
>= 11:0, < 11:2022-07-01
>= 12:0, < 12:2022-07-01
>= 12L:0, < 12L:2022-07-01
Fixed in 10:2022-07-01. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The KeyChain package is a part of the Android ecosystem and is responsible for managing the secure storage of cryptographic keys, certificates, and credentials. It provides a secure and convenient way for applications to access and use these sensitive resources. However, a vulnerability has been discovered in the KeyChainActivity component, which can be exploited to trick users into disclosing their keys stored in the KeyChain.
Vulnerability Detail
The vulnerability exists in the choosePrivateKeyAlias function of KeyChain.java. Due to improper input validation, an attacker can inject CRLF (Carriage Return Line Feed) characters into the input, leading to a CRLF injection vulnerability. By manipulating the input, an attacker can trick the user into selecting a malicious certificate, which can then be used to access sensitive information stored in the KeyChain. This vulnerability does not require any additional execution privileges and can be exploited with user interaction.
How To Fix
Minimum fixed version
10:2022-07-01
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the fix provided by the KeyChain package as soon as possible.
Conclusion
In conclusion, the KeyChainActivity component in the KeyChain package is vulnerable to CRLF injection, which can be exploited to trick users into disclosing their keys stored in the KeyChain. Developers should update their applications to use the latest version of the KeyChain package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for platform/packages/apps/KeyChain →
FAQ
This vulnerability can lead to local information disclosure, allowing an attacker to access sensitive information stored in the KeyChain.
No, this vulnerability can be exploited with user interaction and does not require any additional execution privileges.
This vulnerability affects Android versions 10, 11, 12, and 12L.
Yes, a fix has been released by the KeyChain package. Developers should update their applications to use the latest version of the KeyChain package.
More information about this vulnerability can be found in the Android Open Source Vulnerability database: https://storage.googleapis.com/android-osv/ASB-A-221859869.json
Related vulnerabilities
Recent vulnerabilities recorded for platform/packages/apps/KeyChain.