Skip to content

Python CWE-073 Arbitrary file reading#6977

Closed
haby0 wants to merge 2 commits into
github:mainfrom
haby0:py/any-file-read
Closed

Python CWE-073 Arbitrary file reading#6977
haby0 wants to merge 2 commits into
github:mainfrom
haby0:py/any-file-read

Conversation

@haby0
Copy link
Copy Markdown
Contributor

@haby0 haby0 commented Oct 27, 2021

Accessing files using paths constructed by user-controlled data may allow attackers to access unexpected resources, leading to leakage of sensitive information.

@haby0 haby0 requested a review from a team as a code owner October 27, 2021 14:22
@haby0 haby0 changed the title Python CWE-073 any file read Python CWE-073 Arbitrary file reading Oct 28, 2021

override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) {
exists(DataFlow::CallCfgNode call |
call = API::moduleImport("falsk").getMember("make_response").getACall() and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
call = API::moduleImport("falsk").getMember("make_response").getACall() and
call = API::moduleImport("flask").getMember("make_response").getACall() and

:)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

RasmusWL added a commit to RasmusWL/codeql that referenced this pull request Oct 28, 2021
Thanks to @haby0 who originally proposed this as part of
github#6977
@haby0 haby0 closed this Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants