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

Potential for arbitrary code execution #75

Closed
ghaspias opened this issue Jun 20, 2021 · 0 comments
Closed

Potential for arbitrary code execution #75

ghaspias opened this issue Jun 20, 2021 · 0 comments

Comments

@ghaspias
Copy link

ghaspias commented Jun 20, 2021

The code in this line is a potential vulnerability, if we load some data file with malicious content...
https://github.com/fangq/jsonlab/blob/0a393469768575fe07d89f74ee75ced9d8d20c34/loadjson.m#L261

loadjson('{"root": [dir]}') executes Matlab code dir...
loadjson('{"root": [system(...)]}') executes system commands!!!

Loading the file below will launch notepad.exe... (remove .log extension)
vuln_test.json.log

ghaspias added a commit to ghaspias/jsonlab that referenced this issue Jun 20, 2021
Parse the potential string with regexp instead of using eval. This addresses NeuroJSON#75
@fangq fangq closed this as completed in f7d8226 Jun 23, 2021
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

1 participant