Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • lava lava
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 62
    • Merge requests 62
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Merge requests
  • !1834

Merged
Created Sep 28, 2022 by Igor Ponomarev@igo95862Contributor

Replace dynamic code compilation (exec) in lava_server/lavatable.py

  • Overview 2
  • Commits 1
  • Changes 1

exec is extremely dangerous and can lead to remote code execution.

It is also very slow.

I could not create a remote code execution with the exec code. It does use html sanitiser to remove quotes from input but none of the other control symbols. I tried using the literal code inputs like \x22 which is a double quote in hexadecimal. By lucky turn of events str.format will auto escape back slashes (i,e, \x22 -> \\x22) However, it still feels like one step away from remote code execution. The new patch uses dictionaries and unpacking to programatically create arguments. It is not vulnerable to any character insertions.

I manually tested that the queries are properly added.

Edited Oct 06, 2022 by Igor Ponomarev
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: remove-exec-from-lava-server-lavatable