Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible high severity issue which exposes the Werkzeug debugger and allows the execution of arbitrary code #47

Open
usmanovbf opened this issue Dec 25, 2022 · 1 comment

Comments

@usmanovbf
Copy link

➜  vakt git:(master) bandit -r ./ -lll
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: None
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: None
[main]	INFO	running on Python 3.10.8
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Run started:2022-12-25 20:21:25.524801

Test results:
>> Issue: [B201:flask_debug_true] A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code.
   Severity: High   Confidence: Medium
   CWE: CWE-94 (https://cwe.mitre.org/data/definitions/94.html)
   More Info: https://bandit.readthedocs.io/en/1.7.5/plugins/b201_flask_debug_true.html
   Location: ./examples/regex-policies/server.py:158:4
157	    init()
158	    app.run(debug=True)

--------------------------------------------------

Code scanned:
	Total lines of code: 8214
	Total lines skipped (#nosec): 0

Run metrics:
	Total issues (by severity):
		Undefined: 0
		Low: 773
		Medium: 20
		High: 1
	Total issues (by confidence):
		Undefined: 0
		Low: 13
		Medium: 5
		High: 776
Files skipped (0):

The output above is the result of the execution https://github.com/PyCQA/bandit

@usmanovbf usmanovbf changed the title Possible high severity issue Possible high severity issue which exposes the Werkzeug debugger and allows the execution of arbitrary code Dec 25, 2022
@kolotaev
Copy link
Owner

kolotaev commented Dec 25, 2022

Hello! Thank you for the issue!
This vulnerability is only within the example directory, which is basically an extremely simple non-production example, so I think there's nothing to be worried about :)

OTOH, I think I need to delete debug=True from the example, because it doesn't bring much value to the table, but on the contrary shows a potentially insecure practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants