LDAP bind credentials transmitted in plaintext (no TLS) #95
Closed
opened 2026-09-01 00:13:37 -04:00 by jared
·
1 comment
No Branch/Tag Specified
main
development
fix/comment-markdown-persist-18
deploy-2026.10.03-279
deploy-2026.10.03-275
deploy-2026.09.26-272
deploy-2026.09.25-268
deploy-2026.09.25-264
deploy-2026.09.24-258
deploy-2026.09.24-254
deploy-2026.09.12-242
deploy-2026.09.12-238
deploy-2026.09.12-234
deploy-2026.09.12-230
deploy-2026.09.12-226
deploy-2026.09.12-222
deploy-2026.09.11-218
deploy-2026.09.11-214
deploy-2026.09.11-210
deploy-2026.09.11-206
deploy-2026.09.11-202
deploy-2026.09.11-198
deploy-2026.09.11-194
deploy-2026.09.11-190
deploy-2026.09.11-186
deploy-2026.09.09-182
deploy-2026.09.09-178
deploy-2026.09.08-172
deploy-2026.09.01-163
deploy-2026.08.08-155
deploy-2026.08.08-151
deploy-2026.08.08-147
deploy-2026.08.08-143
deploy-2026.08.08-139
deploy-2026.07.15-130
deploy-2026.07.15-122
deploy-2026.07.11-107
deploy-2026.06.30-96
deploy-2026.06.30-92
deploy-2026.06.30-88
deploy-2026.06.30-84
deploy-2026.06.30-80
deploy-2026.06.30-76
deploy-2026.06.30-72
deploy-2026.06.30-68
deploy-2026.04.29-49
deploy-2026.04.29-41
deploy-2026.04.18-35
deploy-2026.04.16-31
deploy-2026.04.16-27
deploy-2026.04.16-23
deploy-2026.04.16-11
deploy-2026.04.14-9
Labels
Clear labels
api
bug
concurrency
config
data-integrity
dead-code
documentation
duplicate
enhancement
help wanted
invalid
needs-decision
notifications
performance
priority/docs
priority/high
priority/low
priority/medium
question
rate-limiting
reliability
security
ux
wontfix
workflow
Bearer/internal API surface
Something is not working
Race condition / concurrency bug
Configuration / deployment default
Data correctness / schema / integrity issue
Unused / dead code cleanup
README / docs accuracy
This issue or pull request already exists
New feature
Need some help
Something is wrong
Needs a maintainer decision, not clearly a bug
Matrix / in-app notification bug
Performance or resource-usage concern
Documentation-only gap
High-severity / high-impact issue
Low-severity / cosmetic issue
Medium-severity issue
More information is needed
Rate limiting behavior
Reliability / error-handling gap
Security or access-control impact
User-facing UX/functional bug
This won't be fixed
Ticket status workflow engine
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/tinker_tickets#95
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Medium
api/user_avatar.php(~line 116) connects vialdap://$ldapHost:$ldapPort— neverldaps://, and there's noldap_start_tls()call anywhere in the file or codebase.LDAP_BIND_PW(from.env) is sent over the wire unencrypted on every avatar fetch.Impact: If
LDAP_HOSTisn't reached over an already-fully-trusted, isolated network segment, the bind password is sniffable by anything with visibility into that network path. Not currently logged anywhere (verified: the onlyerror_log()on bind failure logsldap_error()'s generic message, not the password), so this is purely a transport-security gap, not a credential-logging one.Fix: Switch to
ldaps://(if the LDAP server supports it) or add anldap_start_tls()call before binding, with LDAP_PORT/config updated accordingly.Fixed in commit
863f84f(merged to main in74544ac), plus infra changes deployed alongside it.api/user_avatar.php connected via ldap://$ldapHost:$ldapPort -- never ldaps://, so LDAP_BIND_PW went over the wire unencrypted on every avatar fetch.
Switched to ldaps://, and changed LDAP_HOST/LDAP_PORT to ldap.lotusguild.org:6360 (lldap'''s LDAPS listener) instead of the bare IP on port 3890. PHP'''s ldap extension verifies the server cert'''s hostname by default, so a bare IP won'''t validate against the LDAPS cert (issued for *.lotusguild.org) -- LDAP_HOST has to be a hostname the cert actually covers.
Two infra changes were needed to make this work, not just the code:
Verified end-to-end against the real lldap server (pct 147) and the real production tinker_tickets host (10.10.10.45): confirmed the Pi-hole override resolves correctly, then ran the actual ldap_connect/ldap_bind sequence on production with the real LDAP_BIND_DN/LDAP_BIND_PW from its live config -- got a successful bind over a verified LDAPS connection (valid Let'''s Encrypt cert, chain + hostname both checked, no verification bypass).
Also noticed while deploying: production'''s webhook-based auto-deploy didn'''t pick up the push to main on its own (had to run tinker_deploy.sh manually to get the fix live) -- separate issue from this one, flagging in case it'''s worth looking at.