{"answers":{"affected":"2 open source packages ship an affected version, including ses.","exploited":"There is no known exploitation of GHSA-whpx-q3rq-w8jc in the wild and no public exploit code.","fix":"Upgrade ses to 0.16.0 or later.","what":"GHSA-whpx-q3rq-w8jc is a vulnerability in ses, published on 20 Oct 2022."},"fix_prompt":"Check this codebase for GHSA-whpx-q3rq-w8jc and fix it if it is affected.\n\nWhat it is: GHSA-whpx-q3rq-w8jc is a vulnerability in ses, published on 20 Oct 2022. \nExploitation: There is no known exploitation of GHSA-whpx-q3rq-w8jc in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ses (npm): affected all versions; fixed in 0.16.0\n- ses (npm): affected all versions; fixed in 0.16.0\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/GHSA-whpx-q3rq-w8jc/ (Markdown: https://insights.sbomify.com/GHSA-whpx-q3rq-w8jc/index.md)","id":"GHSA-whpx-q3rq-w8jc","markdown":"https://insights.sbomify.com/GHSA-whpx-q3rq-w8jc/index.md","name":"GHSA-whpx-q3rq-w8jc","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"unknown","non_default_config":false,"product_category":"JavaScript security library","requires_auth":"none","summary":"SES library fails to harden TypedArray properties with non-canonical numeric names, allowing API pollution in shared contexts.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nIn Hardened JavaScript, programs can `harden` objects to safely share objects with co-tenant programs without risk of these other programs tampering with their API surface. Hardening does not guarantee that objects are pure or immutable, so a hardened `Map`, for example is superficially tamper-proof, but any party holding a reference to the object can both read and write its contents. Based on this precedent, and because `TypedArray` instances cannot be frozen with `Object.isFrozen`, `harden` does not `freeze` `TypedArrays` and instead makes them non-extensible and makes all non-indexed properties non-writable and non-configurable. This is consistent with the treatment of `Map` because the indexed properties represent mutable content and non-indexed properties represent the API.\n\nDue to a defect in `harden`, properties that have names that parse as numbers but are not the same as the canonical representation of those numbers, as in `\"+0\"` and `\"\"` which are both equivalent to their canonical number `\"0\"`,  remain writable after hardening.\n\nAny program treating one of these properties as part of its API and relying on `harden` to prevent modifications would be vulnerable to an API pollution attack, affecting only instances shared by mutually suspicious parties.\n\nUnlike a `Map`, a hardened `TypedArray` can only have numbers for content. Any program that is sharing hardened `TypedArrays` between co-tentant programs and relying on harden to only allow these programs to communicate exclusively by changing numbers within the bounds of the TypedArray, may inadvertently have arranged for a mechanism for a pair of third-parties to communicate arbitrary objects on these other properties.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nSES version 0.16.0 patches this issue, causing `harden` to recognize properties with non-canonical numeric representations and ensuring that these properties are non-configurable.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nUsers should avoid sharing `TypedArrays` between co-tenant programs and instead create wrapper objects that produce a read-only view of the underlying data. We allow `harden` to succeed for `TypedArrays` because the treatment is in fact consistent with the behavior of collections like `Map`, but all collections shared between co-tentant programs should probably be attenuated to either read- or write-only facets and probably close over only part of the content of the collection. However, the motivation for allowing `TypedArrays` to be hardened in practice is to allow certain legacy modules to function under Hardened JavaScript with LavaMoat, since they export `TypedArrays`, even though they would ideally export read-only facets of these.\n\n### References\n_Are there any links users can visit to find out more?_\n\nNot at this time.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@agoric.com](mailto:security@agoric.com)","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Hardening of TypedArrays with non-canonical numeric property names in SES","id":"GHSA-whpx-q3rq-w8jc","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.16.0"],"introduced":["0"],"last_affected":[],"package":"ses","purl":null,"source":"GHSA-whpx-q3rq-w8jc"},{"ecosystem":"npm","fixed":["0.16.0"],"introduced":["0"],"last_affected":[],"package":"ses","purl":"pkg:npm/ses","source":"GHSA-whpx-q3rq-w8jc"}],"products":null,"published":"2022-10-20","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"SES library fails to harden TypedArray properties with non-canonical numeric names, allowing API pollution in shared contexts.","url":"https://insights.sbomify.com/GHSA-whpx-q3rq-w8jc/"}