array-to-tree
array-to-tree copied to clipboard
Bump json from 9.0.6 to 10.0.0
Bumps json from 9.0.6 to 10.0.0.
Changelog
Sourced from json's changelog.
10.0.0
Backward incompatible and security-related change to parsing "lookup" strings.
This version restricts the supported syntax for bracketed "lookup" strings to fix a possible vulnerability (CVE-2020-7712). With a carefully crafted lookup string, command injection was possible. See #144 for a repro. If you use
json(the CLI or as a node.js module) and run arbitrary user-provided strings as a "lookup", then you should upgrade.For the
jsonCLI, a "lookup" string is the 'foo' in:echo ...some json... | json foowhich allows you to lookup fields on the given JSON, e.g.:
$ echo '{"foo": {"bar": "baz"}}' | json foo.bar bazIf one of the lookup fields isn't a valid JS identifier, then the JS array notation is supported:
$ echo '{"https://example.com": "my-value"}' | json '["https://example.com"]' my-valueBefore this change,
jsonwould effectively exec the string between the brackets as JS code such that things like the following were possible:$ echo '{"foo3": "bar"}' | json '["foo" + 3]' barThis change limits supported bracket syntax in lookups to a simple quoted string:
["..."] ['...'] [`...`] # no variable interpolationOtherwise generating an error of the form:
json: error: invalid bracketed lookup string: "[\"foo\" + 3]" (must be of the form ['...'], ["..."], or [`...`])
Commits
cc47981BREAKING CHANGE: limit syntax for bracketed lookup strings to fix vuln (#145)8d3cf25Update README.md- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the Security Alerts page.