{"answers":{"affected":"4 open source packages ship an affected version, including json5. It affects 2 products.","exploited":"There is no known exploitation of CVE-2022-46175 in the wild and no public exploit code.","fix":"Upgrade json5 to a fixed version for your release line: 1.0.2 or 2.2.2.","what":"CVE-2022-46175 is a high-severity unsafe deserialization vulnerability in Fedoraproject Fedora, published on 24 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-46175 and fix it if it is affected.\n\nWhat it is: CVE-2022-46175 is a high-severity unsafe deserialization vulnerability in Fedoraproject Fedora, published on 24 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-46175 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- json5 (npm): affected all versions; fixed in 1.0.2\n- json5 (npm): affected all versions; fixed in 1.0.2\n- json5 (npm): affected from 2.0.0; fixed in 2.2.2\n- json5 (npm): affected from 2.0.0; fixed in 2.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-46175/ (Markdown: https://insights.sbomify.com/CVE-2022-46175/index.md)","id":"CVE-2022-46175","markdown":"https://insights.sbomify.com/CVE-2022-46175/index.md","name":"CVE-2022-46175","record":{"aliases":["AZL-44886","CLSA-2026-1773015271","CLSA-2026-1773706636","CLSA-2026-1777077480","CLSA-2026-1780879895","CLSA-2026-1792779379","DEBIAN-CVE-2022-46175","DLA-3665-1","GHSA-9c47-m6qq-7p4h","MINI-7pg3-5jc7-c6f6","ROOT-APP-NPM-CVE-2022-46175","UBUNTU-CVE-2022-46175","USN-6758-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"JSON5 parsing library","requires_auth":"low_privilege","summary":"Attackers can pollute object prototypes via crafted JSON5 input, potentially leading to code execution or privilege escalation in applications using the library.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"json5","vendor":"json5"}],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-1321","name":"Improperly Controlled Modification of Object Prototype Attributes"}],"description":"JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e.g. for config files). The `parse` method of the JSON5 library before and including versions 1.0.1 and 2.2.1 does not restrict parsing of keys named `__proto__`, allowing specially crafted strings to pollute the prototype of the resulting object. This vulnerability pollutes the prototype of the object returned by `JSON5.parse` and not the global Object prototype, which is the commonly understood definition of Prototype Pollution. However, polluting the prototype of a single object can have significant security impact for an application if the object is later used in trusted operations. This vulnerability could allow an attacker to set arbitrary and unexpected keys on the object returned from `JSON5.parse`. The actual impact will depend on how applications utilize the returned object and how they filter unwanted keys, but could include denial of service, cross-site scripting, elevation of privilege, and in extreme cases, remote code execution. `JSON5.parse` should restrict parsing of `__proto__` keys when parsing JSON strings to objects. As a point of reference, the `JSON.parse` method included in JavaScript ignores `__proto__` keys. Simply changing `JSON5.parse` to `JSON.parse` in the examples above mitigates this vulnerability. This vulnerability is patched in json5 versions 1.0.2, 2.2.2, and later.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2023-01-11","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-01-11T12:48:17Z","kind":"github_poc","ref":"https://github.com/giz-berlin/quasar-app-webpack-json5-vulnerability","stars":0,"title":"Reproduction for CVE-2022-46175"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Prototype Pollution in JSON5 via Parse Method","id":"CVE-2022-46175","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"deserialization","year":"2022"},"n_packages":4,"n_references":6,"next":{"headline":"Cargo did not verify SSH host keys","id":"CVE-2022-46176"},"packages":[{"ecosystem":"npm","fixed":["1.0.2"],"introduced":["0"],"last_affected":[],"package":"json5","purl":null,"source":"GHSA-9c47-m6qq-7p4h"},{"ecosystem":"npm","fixed":["1.0.2"],"introduced":["0"],"last_affected":[],"package":"json5","purl":"pkg:npm/json5","source":"GHSA-9c47-m6qq-7p4h"},{"ecosystem":"npm","fixed":["2.2.2"],"introduced":["2.0.0"],"last_affected":[],"package":"json5","purl":null,"source":"GHSA-9c47-m6qq-7p4h"},{"ecosystem":"npm","fixed":["2.2.2"],"introduced":["2.0.0"],"last_affected":[],"package":"json5","purl":"pkg:npm/json5","source":"GHSA-9c47-m6qq-7p4h"}],"prev":{"headline":"Race condition during concurrent TLS mounts in efs-utils","id":"CVE-2022-46174"},"products":["json5"],"published":"2022-12-24","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["json5"]},"summary":"Attackers can pollute object prototypes via crafted JSON5 input, potentially leading to code execution or privilege escalation in applications using the library.","url":"https://insights.sbomify.com/CVE-2022-46175/"}