Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.Test your applications
- Snyk ID SNYK-PYTHON-LIBVCS-2421204
- published 14 Mar 2022
- disclosed 11 Mar 2022
- credit Alessio Della Libera of Snyk Research Team
How to fix?
libvcs to version 0.11.1 or higher.
libvcs is a vcs abstraction layer.
Affected versions of this package are vulnerable to Command Injection via argument injection. When calling the
update_repo function (when using hg), the url parameter is passed to the
hg clone command. By injecting some hg options it was possible to get arbitrary command execution.
from libvcs.shortcuts import create_repo r = create_repo(url='--config=alias.clone=!touch ./HELLO', vcs='hg', repo_dir='./') r.update_repo()