{"action":"opened","issue":{"url":"https://api.github.com/repos/vidyamantra/moodle-mod_congrea/issues/4","labels_url":"https://api.github.com/repos/vidyamantra/moodle-mod_congrea/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/vidyamantra/moodle-mod_congrea/issues/4/comments","events_url":"https://api.github.com/repos/vidyamantra/moodle-mod_congrea/issues/4/events","html_url":"https://github.com/vidyamantra/moodle-mod_congrea/issues/4","id":121668924,"number":4,"title":"Lack of user input validation recording.php","user":{"login":"mudrd8mz","id":85831,"avatar_url":"https://avatars.githubusercontent.com/u/85831?v=3","gravatar_id":"","url":"https://api.github.com/users/mudrd8mz","html_url":"https://github.com/mudrd8mz","followers_url":"https://api.github.com/users/mudrd8mz/followers","following_url":"https://api.github.com/users/mudrd8mz/following{/other_user}","gists_url":"https://api.github.com/users/mudrd8mz/gists{/gist_id}","starred_url":"https://api.github.com/users/mudrd8mz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mudrd8mz/subscriptions","organizations_url":"https://api.github.com/users/mudrd8mz/orgs","repos_url":"https://api.github.com/users/mudrd8mz/repos","events_url":"https://api.github.com/users/mudrd8mz/events{/privacy}","received_events_url":"https://api.github.com/users/mudrd8mz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-11T09:21:28Z","updated_at":"2015-12-11T09:21:28Z","closed_at":null,"body":"In the file recording.php you have `$vmsession = $_POST['sesseionkey'];`. Direct access to these superglobals is discouraged (if not prohibited) for good reasons.\r\n\r\nIn your case, you do not validate the param and then use it to populate the `$filepath` property. By submitting malicious content, such as `/../../../some/path/file.php`, the attacker has a chance to inject their code into the server (given they steal the session granting them the capability).\r\n\r\nFor reasons like this, always use Moodle's inbuilt functions like `required_param()` with strict parameter set, such as `PARAM_FILE`."}}