Skip to content
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

Sensitive Information in Logs: NTLM Password Should Not Be Printed #110

Open
HelmutLety opened this issue Jan 14, 2025 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@HelmutLety
Copy link

Description:
In the current implementation, the password is being printed in the logs at the info level, as seen in the following log entry:

 ts=2025-01-14T11:50:26.946884608Z level=info logger=newNtlm msg="NTLM verification start" username=test-user password=test-password url=http://example.com/

This is a security concern, as sensitive information (e.g., passwords) should not be exposed in logs. At most, such information should be logged at the debug level, or ideally, omitted entirely.

Relevant Code:
The issue occurs in the following line of code:
ntlm_certsrv.go#L51

Proposed Solution:

  • If the password is necessary for debugging purposes, ensure it is only logged at the debug level

I am available to make the necessary changes and submit a pull request to address this issue if approved.

Steps to Reproduce:

  1. Trigger the NTLM verification process.
  2. Observe the info level logs for the printed password.

Severity:
High — This could potentially expose sensitive credentials in production logs.

Let me know if I should proceed with implementing the fix!

@djkormo djkormo added the bug Something isn't working label Jan 15, 2025
@djkormo
Copy link
Owner

djkormo commented Jan 15, 2025

You are absolutely right. Try to prepare PR for this.

If needed the logs for this should be visible only in debug mode.

Do you have

os.Getenv("ENABLE_DEBUG") == "true"

enabled ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants