Skip to content

[Bug] Specific Data Flow Cannot Be Detected in PHP Problem Description #5763

@wpcat

Description

@wpcat

Describe the bug
Given PHP file content, with source point set as $_FILES and sink point as move_uploaded_file, the data flow corresponding to the sink point at a specific location cannot be found.

To Reproduce

  1. Import test.php file into Joern terminal
  2. Set source and sink, def source = cpg.call.code(".*\\$_FILES.*").argument.l def sink = cpg.call.name("move_uploaded_file").argument.l
  3. run command sink.reachableByFlows(source).p

Actual Result
The move_uploaded_file location at line 41 cannot be detected, while the move_uploaded_file location at line 59 can be detected.

Screenshots below:

Image Image
  1. See error

Expected behavior
Both move_uploaded_file locations at line 41 and line 59 should be detected, showing corresponding data flows.

testphp.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions