Skip to content

CassandraConnection.toString() leaks the password #71

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
ber00000 opened this issue Sep 3, 2024 · 1 comment
Closed

CassandraConnection.toString() leaks the password #71

ber00000 opened this issue Sep 3, 2024 · 1 comment
Labels
security Security issue

Comments

@ber00000
Copy link

ber00000 commented Sep 3, 2024

Hi,

I'm using this library with HikariCP and I noticed that when Hikari add a connection to the pool, the connection properties are logged including the password in clear text!

Passwords should not leak.

It can simply be reproduced by this snippet:

final Connection connection = DriverManager.getConnection(url, user, password);
System.out.println("connection = " + connection);

It will print out something like this:

connection = CassandraConnection [connectionProperties=... password=password, ..., user=user ...}]

For comparison Oracle driver prints out:

connection oracle.jdbc.driver.T4CConnection@1b90bf7d

@maximevw maximevw added the security Security issue label Sep 4, 2024
maximevw added a commit that referenced this issue Sep 4, 2024
@maximevw
Copy link
Collaborator

maximevw commented Sep 4, 2024

Thanks @ber00000 for this finding!

A patched version 4.13.1 solving this issue has been published.

@maximevw maximevw closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Security issue
Projects
None yet
Development

No branches or pull requests

2 participants