jsonata: Improperly Controlled Modification of Object Prototype Attributes
CVE-2024-27307 is a critical-severity improperly controlled modification of object prototype attributes vulnerability in jsonata from Jsonata-js, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected jsonata versions: >= 1.4.0, < 1.8.7; >= 2.0.0, < 2.0.4. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.42% chance of exploitation within 30 days, higher than 73% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update jsonata to 1.8.7 or 2.0.4, whichever matches your release line, or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Jsonata-js | jsonata | >= 1.4.0, < 1.8.7; >= 2.0.0, < 2.0.4 | Not stated |
| Jsonatajs | jsonata | 1.4.0 up to, but not including, 1.8.7; 2.0.0 up to, but not including, 2.0.4 | 1.8.7, 2.0.4 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by CNA (github.com).
Official description
JSONata is a JSON query and transformation language. Starting in version 1.4.0 and prior to version 1.8.7 and 2.0.4, a malicious expression can use the transform operator to override properties on the `Object` constructor and prototype. This may lead to denial of service, remote code execution or other unexpected behavior in applications that evaluate user-provided JSONata expressions. This issue has been fixed in JSONata versions 1.8.7 and 2.0.4. Applications that evaluate user-provided expressions should update ASAP to prevent exploitation. As a workaround, one may apply the patch manually.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improperly Controlled Modification of Object Prototype Attributes
The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.
How developers prevent this class of flaw
- By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
- When handling untrusted objects, validating using a schema can be used.
More Improperly Controlled Modification of Object Prototype Attributes vulnerabilities (CWE-1321)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/jsonata-js/jsonata/security/advisories/GHSA-fqg8-vfv7-8fj8Technical Description
Patches and release notes
- github.com/jsonata-js/jsonata/commit/1d579dbe99c19fbe509f5ba2c6db7959b0d456d1
- github.com/jsonata-js/jsonata/commit/335d38f6278e96c908b24183f1c9c90afc8ae00c
- github.com/jsonata-js/jsonata/commit/c907b5e517bb718015fcbd993d742ba6202f2be2
- github.com/jsonata-js/jsonata/releases/tag/v2.0.4Product, Release Notes
Other vulnerabilities in jsonata
- 9.3 Critical severity
- 9.3 Critical severity
- 9.3 Critical severity
- 7.5 High severity
Recent Improperly Controlled Modification of Object Prototype Attributes vulnerabilities
- 7.5 High severity
- 8.2 High severity
- 9.8 Critical severity
- 7.8 High severity
- 7.5 High severity
- 9.8 Critical severity
Spotted an error? Tell us.