Skip to content

[SECURITY] Update dependency jsonpath to v1.3.0#162

Open
specmatic-builder wants to merge 1 commit intomainfrom
renovate/npm-jsonpath-vulnerability
Open

[SECURITY] Update dependency jsonpath to v1.3.0#162
specmatic-builder wants to merge 1 commit intomainfrom
renovate/npm-jsonpath-vulnerability

Conversation

@specmatic-builder
Copy link
Copy Markdown
Contributor

@specmatic-builder specmatic-builder commented Mar 5, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
jsonpath 1.2.11.3.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2026-1615

Impact

Arbitrary Code Injection (Remote Code Execution & XSS):

A critical security vulnerability affects all versions of the jsonpath package. The library relies on the static-eval module to evaluate JSON Path expressions but fails to properly sanitize or sandbox the input.

This allows an attacker to inject arbitrary JavaScript code into the JSON Path expression. When the library evaluates this expression, the malicious code is executed.

  • Node.js Environments: This leads to Remote Code Execution (RCE), allowing an attacker to compromise the server.
  • Browser Environments: This leads to Cross-Site Scripting (XSS), allowing an attacker to hijack user sessions or exfiltrate data.

Affected Methods:

The vulnerability triggers when untrusted data is passed to any method that evaluates a path, including:

  • jsonpath.query
  • jsonpath.nodes
  • jsonpath.paths
  • jsonpath.value
  • jsonpath.parent
  • jsonpath.apply

Patches

No Patch Available:

Currently, all versions of jsonpath are vulnerable. There is no known patched version of this package that resolves the issue while retaining the current architecture.

Recommendation:

Developers are strongly advised to migrate to a secure alternative (such as jsonpath-plus or similar libraries that do not use eval/static-eval) or strictly validate all JSON Path inputs against a known allowlist.

Workarounds

  • Strict Input Validation: Ensure that no user-supplied data is ever passed directly to jsonpath functions.
  • Sanitization: If user input is unavoidable, implement a strict parser to reject any JSON Path expressions containing executable JavaScript syntax (e.g., parentheses (), script expressions script:, or function calls).

Resources


jsonpath has Arbitrary Code Injection via Unsafe Evaluation of JSON Path Expressions

CVE-2026-1615 / GHSA-87r5-mp6g-5w5j

More information

Details

Impact

Arbitrary Code Injection (Remote Code Execution & XSS):

A critical security vulnerability affects all versions of the jsonpath package. The library relies on the static-eval module to evaluate JSON Path expressions but fails to properly sanitize or sandbox the input.

This allows an attacker to inject arbitrary JavaScript code into the JSON Path expression. When the library evaluates this expression, the malicious code is executed.

  • Node.js Environments: This leads to Remote Code Execution (RCE), allowing an attacker to compromise the server.
  • Browser Environments: This leads to Cross-Site Scripting (XSS), allowing an attacker to hijack user sessions or exfiltrate data.

Affected Methods:

The vulnerability triggers when untrusted data is passed to any method that evaluates a path, including:

  • jsonpath.query
  • jsonpath.nodes
  • jsonpath.paths
  • jsonpath.value
  • jsonpath.parent
  • jsonpath.apply
Patches

No Patch Available:

Currently, all versions of jsonpath are vulnerable. There is no known patched version of this package that resolves the issue while retaining the current architecture.

Recommendation:

Developers are strongly advised to migrate to a secure alternative (such as jsonpath-plus or similar libraries that do not use eval/static-eval) or strictly validate all JSON Path inputs against a known allowlist.

Workarounds
  • Strict Input Validation: Ensure that no user-supplied data is ever passed directly to jsonpath functions.
  • Sanitization: If user input is unavoidable, implement a strict parser to reject any JSON Path expressions containing executable JavaScript syntax (e.g., parentheses (), script expressions script:, or function calls).
Resources

Severity

  • CVSS Score: 8.2 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

dchester/jsonpath (jsonpath)

v1.3.0

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot. Specmatic specific configuration is managed here.

@specmatic-builder specmatic-builder changed the title [SECURITY] Update dependency jsonpath to v1.3.0 [SECURITY] Update dependency jsonpath to v1.3.0 - autoclosed Mar 9, 2026
@specmatic-builder specmatic-builder deleted the renovate/npm-jsonpath-vulnerability branch March 9, 2026 00:34
@specmatic-builder specmatic-builder changed the title [SECURITY] Update dependency jsonpath to v1.3.0 - autoclosed [SECURITY] Update dependency jsonpath to v1.3.0 Mar 10, 2026
@specmatic-builder specmatic-builder force-pushed the renovate/npm-jsonpath-vulnerability branch 2 times, most recently from bc9b8e3 to 4d88727 Compare March 10, 2026 00:29
@specmatic-builder specmatic-builder changed the title [SECURITY] Update dependency jsonpath to v1.3.0 [SECURITY] Update dependency jsonpath to v1.3.0 - autoclosed Mar 12, 2026
@specmatic-builder specmatic-builder changed the title [SECURITY] Update dependency jsonpath to v1.3.0 - autoclosed [SECURITY] Update dependency jsonpath to v1.3.0 Mar 13, 2026
@specmatic-builder specmatic-builder force-pushed the renovate/npm-jsonpath-vulnerability branch 2 times, most recently from 4d88727 to ff2e96f Compare March 13, 2026 00:33
@specmatic-builder specmatic-builder changed the title [SECURITY] Update dependency jsonpath to v1.3.0 [SECURITY] Update dependency jsonpath to v1.3.0 - autoclosed Mar 28, 2026
@specmatic-builder specmatic-builder changed the title [SECURITY] Update dependency jsonpath to v1.3.0 - autoclosed [SECURITY] Update dependency jsonpath to v1.3.0 Mar 29, 2026
@specmatic-builder specmatic-builder force-pushed the renovate/npm-jsonpath-vulnerability branch 2 times, most recently from ff2e96f to bfbebdd Compare March 29, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant