CWE
74 113 79
Advisory Published
CVE Published
Updated

CVE-2019-16771: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting') in Armeria

First published: Thu Dec 05 2019(Updated: )

## Multiple timing attack vulnerabilities leading to the recovery of secrets based on the use of non-constant time compare function ### Impact String comparison method in multiple authentication validation in Armeria were known to be vulnerable to timing attacks. This vulnerability is caused by the insecure implementation of `equals` method from `java.lang.String`. While this attack is not practically possible, an attacker still has a potential to attack if the victim's server validates user by using `equals` method. We would like to thank @chrsow for pointing out the issue. ## Potentially vulnerable codes https://github.com/line/armeria/blob/f0d870fde1088114070be31b67f7df0a21e835c6/core/src/main/java/com/linecorp/armeria/server/auth/OAuth2Token.java#L54 https://github.com/line/armeria/blob/f0d870fde1088114070be31b67f7df0a21e835c6/core/src/main/java/com/linecorp/armeria/server/auth/BasicToken.java#L64 ### Patches There are two options to patch this issue. 1. Remove `equals` method; it has been exclusively used for test cases and was never used in any OSS projects that are using Armeria. (But it is worth noting that there are possibilities of closed projects authenticating users by utilizing `equals` method) 2. Use `MessageDigest.isEqual` to compare the credential instead. ### Workarounds 1. Update to the latest version (TBD) 2-1. Users can prevent these vulnerabilities by modifying and implementing timing attack preventions by themselves. 2-2. Precisely speaking, it is possible to compare credentials by securely comparing them after calling methods to directly return the input (namely `Object. accessToken()`, `Object.username()` and `Object.password()`). ### References - https://cwe.mitre.org/data/definitions/208.html - https://security.stackexchange.com/questions/111040/should-i-worry-about-remote-timing-attacks-on-string-comparison ### Side Note Since it is a theoretical attack, there is no PoC available from neither the vendor nor the security team.

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Linecorp Armeria>=0.85.0<0.97.0
maven/com.linecorp.armeria:armeria>=0.50.0<0.97.0
0.97.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2019-16771?

    CVE-2019-16771 is a vulnerability in Armeria versions 0.85.0 through 0.96.0 that allows remote attackers to inject arbitrary HTTP headers via CRLF sequences when unsanitized data is used to populate the headers of an HTTP response.

  • What is the severity of CVE-2019-16771?

    CVE-2019-16771 has a severity rating of 6.5 (medium).

  • How can I fix CVE-2019-16771?

    To fix CVE-2019-16771, you should update Armeria to version 0.97.0 or later, as this vulnerability has been patched in version 0.97.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203