jsonata@1.0.4

JSON query and transformation language

  • latest version

    2.2.2

  • latest non vulnerable version

  • first published

    9 years ago

  • latest version published

    1 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the jsonata package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • C
    Arbitrary Code Injection

    jsonata is a JSON query and transformation language

    Affected versions of this package are vulnerable to Arbitrary Code Injection via the lookup function due to a missing hasOwnProperty check. An attacker can execute arbitrary code by submitting crafted expressions.

    How to fix Arbitrary Code Injection?

    Upgrade jsonata to version 1.8.8, 2.2.0 or higher.

    <1.8.8>=2.0.0 <2.2.0
    • H
    Prototype Pollution

    jsonata is a JSON query and transformation language

    Affected versions of this package are vulnerable to Prototype Pollution via unsafe object creation patterns throughout the codebase (src/jsonata.js, src/functions.js, src/parser.js, src/signature.js, and src/datetime.js). An attacker who can supply a malicious JSONata expression or input object can inject properties into Object.prototype, affecting all objects in the runtime and potentially leading to remote code execution, data tampering, or denial of service. Objects were created with {} (inheriting from Object.prototype) and iterated with for...in loops, allowing prototype-chain properties to be read or written; hasOwnProperty was also called directly on objects rather than via Object.prototype, making it bypassable.

    How to fix Prototype Pollution?

    Upgrade jsonata to version 1.8.8, 2.2.1 or higher.

    <1.8.8>=2.0.0 <2.2.1
    • C
    Arbitrary Code Injection

    jsonata is a JSON query and transformation language

    Affected versions of this package are vulnerable to Arbitrary Code Injection via crafted expressions that exploit the evaluateTransformExpression and applyProcedure functions. An attacker can execute arbitrary code by submitting specially crafted JSONata expressions that manipulate internal functions and object prototypes.

    How to fix Arbitrary Code Injection?

    Upgrade jsonata to version 1.8.8, 2.2.1 or higher.

    <1.8.8>=2.0.0 <2.2.1
    • H
    Regular Expression Denial of Service (ReDoS)

    jsonata is a JSON query and transformation language

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the $toMillis function. An attacker can cause resource exhaustion by providing specially crafted inputs that trigger excessive backtracking in the ISO-8601 validation regular expression.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade jsonata to version 2.2.0 or higher.

    <2.2.0
    • M
    Prototype Pollution

    jsonata is a JSON query and transformation language

    Affected versions of this package are vulnerable to Prototype Pollution via several functions, including createFrame() and bind(). An attacker can modify object prototype attributes directly. In an additional vector, the attacker can pollute hasOwnProperty itself, in some instances that use it as a prototype pollution prevention mechanism already.

    How to fix Prototype Pollution?

    Upgrade jsonata to version 2.2.1 or higher.

    <2.2.1