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

Security vulnerability from project .ackrc files #399

Closed
jimrandomh opened this issue Nov 8, 2013 · 4 comments
Closed

Security vulnerability from project .ackrc files #399

jimrandomh opened this issue Nov 8, 2013 · 4 comments

Comments

@jimrandomh
Copy link

Running "ack" in a directory which contains a malicious .ackrc will cause code execution. This is similar to the old Unix issue where if you put "." on your path, you can be tricked into running something named "ls": an attacker might scatter .ackrc files in different locations. It's not a huge risk, but it seems worth fixing.

The problem is the --pager option: a .ackrc file could say "--pager=./malicious.sh" (or even "--pager=./.ackrc"). The solution would be to forbid that option (and maybe also --output=expr?) in project ackrc files (but still allow it in other places).

@petdance
Copy link
Collaborator

The list of flags to forbid anywhere except your local .ackrc or command line: --pager, --regex and --output.

@petdance
Copy link
Collaborator

petdance commented Dec 3, 2013

ack 2.12 has been release that disallows --pager, --regex and --output in project .ackrcs.

@petdance petdance closed this as completed Dec 3, 2013
@xtaran
Copy link

xtaran commented Dec 12, 2013

The CVE ID "CVE-2013-7069" has been assigned to this issue.

@petdance
Copy link
Collaborator

@jimrandomh: Thank you very much for bringing this to my attention.

I have put up a security alert at http://beyondgrep.com/security/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants