Skip to content

[Go]: Add Improper LDAP Authentication query #762

Closed

Description

@maikypedia

Query PR

github/codeql#13366

Language

GoLang

CVE(s) ID list

CWE

CWE-287

Report

This query covers Improper LDAP Authentication, that con occur when an application uses user-supplied data to establish a connection to a LDAP server.

I used a dataflow configuration looking for UntrustedFlowSource flowing to the password used in LDAP binding.

In order to avoid false positives I used RegexpCheck and equalityAsSanitizerGuard as barriers. For equalityAsSanitizerGuard I have taken as an example the equalityAsSanitizerGuard used in SSRF query. The difference here is that the query will consider whether the string to be compared is empty or not (this should avoid several possible FP)

Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).

  • Yes
  • No

Blog post link

No response

Activity

  1. added
    All For OneSubmissions to the All for One, One for All bounty
    on Jun 4, 2023
  2. self-assigned this
    on Jun 13, 2023
  3. jorgectf commented on Jun 14, 2023

    @jorgectf
    Contributor

    👋 @maikypedia

    Thank you for your contribution!

    This reminds me of github/codeql#5444, but using user-controlled data instead 🚀
    What do you think about also adding an empty string as a source in your query (like this)?

  4. maikypedia commented on Jun 18, 2023

    @maikypedia
    Author

    Hi 👋 @jorgectf, done here 😃 .

  5. jorgectf commented on Jun 21, 2023

    @jorgectf
    Contributor

    Hi 👋 @jorgectf, done here 😃 .

    🎉

    Could you address github/codeql#13366 (comment)? It seems that your query should catch UnauthenticatedBind instead of Bind.

  6. maikypedia commented on Jul 5, 2023

    @maikypedia
    Author

    Hi @jorgectf , I didn't realize that in v3 empty password option with Bind is disabled, sorry for the inconvenience 😅

  7. ghsecuritylab commented on Jul 14, 2023

    @ghsecuritylab
    Collaborator

    Your submission is now in status Closed.

    For information, the evaluation workflow is the following:
    Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

  8. maikypedia commented on Aug 26, 2023

    @maikypedia
    Author

    Due to the fact that LDAP version 3 is not vulnerable, it will not be included in the query. However, the reviewer has said that it would make sense to add v2 to the query instead. 😄

  9. maikypedia commented on Sep 26, 2023

    @maikypedia
    Author

    Sorry for the delay, it has already been rewritten :)

  10. ghsecuritylab commented on Sep 27, 2023

    @ghsecuritylab
    Collaborator

    Your submission is now in status Test run.

    For information, the evaluation workflow is the following:
    Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

  11. ghsecuritylab commented on Oct 6, 2023

    @ghsecuritylab
    Collaborator

    Your submission is now in status Query review.

    For information, the evaluation workflow is the following:
    Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

  12. ghsecuritylab commented on Nov 13, 2023

    @ghsecuritylab
    Collaborator

    Your submission is now in status Final decision.

    For information, the evaluation workflow is the following:
    Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

  13. ghsecuritylab commented on Nov 13, 2023

    @ghsecuritylab
    Collaborator

    Your submission is now in status Pay.

    For information, the evaluation workflow is the following:
    Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

  14. xcorail commented on Nov 13, 2023

    @xcorail
    Contributor

    Created Hackerone report 2250587 for bounty 530077 : [762] [Go]: Add Improper LDAP Authentication query

  15. ghsecuritylab commented on Nov 13, 2023

    @ghsecuritylab
    Collaborator

    Your submission is now in status Closed.

    For information, the evaluation workflow is the following:
    Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

All For OneSubmissions to the All for One, One for All bounty

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions