github / github/codeql

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

未关闭
#21,738 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
CodeQL
星标
10.1k
派生
2.1k
平均合并
2 天 15 小时
30 天内合并 PR
141

描述

`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
```

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
security
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。