Eve has a Comparison of Incompatible Types that Results in Invalid State in pyeve/eve
Reported on
Nov 1st 2022
Description
A conditional statement that always resolves to False.
Proof of Concept
// eve/methods/common.py
if (
field in document
and document[field] is not None
and document[field] is not [] # Always resolves to False
):
related_links = []
Impact
The nested code block will never execute, resulting in invalid data.
Occurrences
common.py L760
Comparing the value of document[field]
to an empty list []
using the is not
comparison operator will always resolve to False. The !=
comparison operator should be used to evaluate this statement.
References
SECURITY.md
a year ago
Thank you. The issue has been closed. The maintainer has added SECURITY.md to the repository.
Please submit a PR. I'll be happy to review it.
@admin I would like to request a CVE if this qualifies.
Sorry for the multiple patch submissions...I'm new lol.
Do I still need to create a PR on GitHub?
nope, I already patched it. Will release in a couple days.
@maintainer feel free to mark it as fixed, the report won't be made public :)