Skip to content

Java: CWE-273 Unsafe certificate trust #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luchua-bc opened this issue May 24, 2020 · 2 comments
Closed

Java: CWE-273 Unsafe certificate trust #102

luchua-bc opened this issue May 24, 2020 · 2 comments
Labels
All For One Submissions to the All for One, One for All bounty

Comments

@luchua-bc
Copy link

CVE ID(s)

List the CVE ID(s) associated with this vulnerability. GitHub will automatically link CVE IDs to the GitHub Advisory Database.

Report

Describe the vulnerability. Provide any information you think will help GitHub assess the impact your query has on the open source community.

The query checks a very common issue with web development - certificate trust manager is set to trust all certificates or the hostname verifier is turned off.

Java offers two mechanisms for SSL authentication - trust manager and hostname verifier. Trust manager validates the peer's certificate chain while hostname verification establishes that the hostname in the URL matches the hostname in the server's identification.

Unsafe implementation of the interface X509TrustManager and HostnameVerifier ignores all SSL certificate validation errors when establishing an HTTPS connection, thereby making the app vulnerable to man-in-the-middle attacks.

I've tested it against some GitHub projects, and a test case has been created to facilitate auto-testing. The relevant PR is PR #3550.

  • [Yes] Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc). We would love to have you spread the word about the good work you are doing
@luchua-bc luchua-bc added the All For One Submissions to the All for One, One for All bounty label May 24, 2020
@xcorail
Copy link
Contributor

xcorail commented Jul 6, 2020

Created Hackerone report 917454 for bounty 227491 : [102] Java: CWE-273 Unsafe certificate trust 🎉

@xcorail xcorail closed this as completed Jul 6, 2020
@luchua-bc
Copy link
Author

Thanks @xcorail for the quick turn-around and the bounty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All For One Submissions to the All for One, One for All bounty
Projects
None yet
Development

No branches or pull requests

2 participants