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

Arbitrary Code Execution in JsonPointer.get #30

Closed
zpbrent opened this issue Mar 28, 2021 · 3 comments
Closed

Arbitrary Code Execution in JsonPointer.get #30

zpbrent opened this issue Mar 28, 2021 · 3 comments
Assignees

Comments

@zpbrent
Copy link

zpbrent commented Mar 28, 2021

Hey maintainers @cehoffman @mortonfox @treybrisbane @chrishalbert , I have opened a PR (418sec#3) which will fix the potential arbitrary code execution vulnerability in json-ptr. Please take a review.

If you are fine with that fix, please comment @huntr-helper - LGTM at 418sec#3, or if you need any modifications, please also comment on that PR. Thanks.

Ref: 418sec#3

@cerebralkungfu cerebralkungfu self-assigned this May 11, 2021
@cerebralkungfu
Copy link
Contributor

For anyone who comes across this issue, the PR, or the associated vulnerability on Huntr or elsewhere. This is a legit and valid vulnerability that will be patched.

If you are a programmer using json-ptr, it is possible for you to hack yourself by passing arbitrary code to the JsonPointer's .get() method. See the referenced PR's PoC to learn how to hack yourself.

If your code accepts user input, does not sanitized the user's input, and forwards the user's input to the JsonPointer's .get() method, then an unscrupulous user could execute arbitrary code in your program.

Never Send Un-sanitized User Input To json-ptr

The vulnerability in this library is my oversight. The vulnerability in your program is your oversight.

@cerebralkungfu
Copy link
Contributor

It appears that this is a duplicate of #28, even though it is a side-affect of that bug.

@cerebralkungfu
Copy link
Contributor

Fixed with the original report #28.

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

2 participants