github / github/codeql

False negative: py/ldap-injection misses taint flow for ldap3 `extend.standard.paged_search`

Đang mở
#21,738 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

`py/ldap-injection` reports taint for `ldap3.Connection.search(...)`, but misses equivalent taint flow in:
`conn.extend.standard.paged_search(search_base=..., search_filter=...)`

```python
from flask import Flask, request
import ldap3
app = Flask(__name__)
@app.route("/paged")
def paged():
dn = "dc={}".format(request.args["dc"])
filt = "(user={})".format(request.args["username"])
conn = ldap3.Connection(ldap3.Server("ldap://127.0.0.1"), user=dn, auto_bind=True)
conn.extend.standard.paged_search(search_base=dn, search_filter=filt) # no alert
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the py/ldap-injection query and compare how ldap3.Connection.search(...) models taint flow with the conn.extend.standard.paged_search(...) call shown here. The work is done when taint reaching search_base and search_filter through this API is reported equivalently to the existing search flow.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
security
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.