{"answers":{"affected":"2 open source packages ship an affected version, including p3-symmetric.","exploited":"There is no known exploitation of GHSA-3g92-f9ch-qjcm in the wild and no public exploit code.","fix":"No fix has been published for GHSA-3g92-f9ch-qjcm yet. Limit exposure of the affected software until one is available.","what":"GHSA-3g92-f9ch-qjcm is a vulnerability in p3-symmetric, published on 16 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-3g92-f9ch-qjcm and fix it if it is affected.\n\nWhat it is: GHSA-3g92-f9ch-qjcm is a vulnerability in p3-symmetric, published on 16 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-3g92-f9ch-qjcm in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- p3-symmetric (crates.io): affected all versions up to 0.5.2; no fix listed\n- p3-symmetric (crates.io): affected all versions up to 0.5.2; no fix listed\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-3g92-f9ch-qjcm/ (Markdown: https://insights.sbomify.com/GHSA-3g92-f9ch-qjcm/index.md)","id":"GHSA-3g92-f9ch-qjcm","markdown":"https://insights.sbomify.com/GHSA-3g92-f9ch-qjcm/index.md","name":"GHSA-3g92-f9ch-qjcm","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust cryptographic library","requires_auth":"none","summary":"An attacker can create hash collisions for inputs of different lengths in Plonky3, potentially bypassing integrity checks in cryptographic proofs.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Vulnerability\nCurrently, when hashing, if the number of elements to hash is not a multiple of the rate, `hash_iter` pads by elements of\nthe current state. This means that it is possible to create iterators of different lengths which lead to an identical hashed state.\n\nGiven a simple example using a `PaddingFreeSponge` with width 8 and rate 4.\nStart with the zero state: [0, 0, 0, 0, 0, 0, 0, 0]\nTake the first 4 elements to hash and insert into the first 4 elements of the state: [h0, h1, h2, h3, 0, 0, 0, 0]\nRun the cryptographic permutation on the state: [p00, p10, p20, p30, p40, p50, p60, p70]\n\nTake the next 4 elements to hash and insert into the first 4 elements of the state: [h4, h5, h6, h7, p40, p50, p60, p70]\nRun the cryptographic permutation: [p01, p11, p21, p31, p41, p51, p61, p71]\n\nRepeat the above two steps until all elements of the iterator have been consumed.\n\nIf the number of elements in the iterator is not a multiple of 4 (say there are 10 elements) then, in the final round,\nthe first 2 elements are overwritten and so our final hash would be of: [h8, h9, p21, p31, p41, p51, p61, p71]\n\nThis means that the iterators over the elements [h0, h1, h2, h3, h4, h5, h6, h7, h8, h9] and [h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, p21] would lead to the same final state of the hasher.\n\n### Impact\n\nThe impact of this vulnerability is a little difficult to estimate. It is important to note that, in circumstances where the number of elements to be hashed is known and fixed in advance, (as is the case for most STARKS), the method is collision resistant. This vulnerability only applies if a malicious user is able to manipulate the number of elements to be hashed.\n\nThat being said, there are theoretically situations where this could allow for an amortising of grinding costs (if a prover can manipulate things to get the same hasher state across multiple proofs).\n\n### Patches\n\nThe fix comes in two parts. The documentation on the current struct `PaddingFreeSponge` has been improved to clarify its intended use case and highlight that it is not collision resistant if an attacker can modify the number of elements being hashed.\n\nIn addition we add a new struct `Pad10Sponge` which is slightly less efficient but safe in all cases. The padding strategy of the new struct is as follows:\n\nIf the number of elements in the iterator is not a multiple of the rate, use a 10 padding scheme. If it is a multiple of the rate add 1 to the first secret state element. In the above example, for hashes of length 9, 10, 11, 12, the final state to be permuted would be\n[h8, 1, 0, 0, p41, p51, p61, p71]\n[h8, h9, 1, 0, p41, p51, p61, p71]\n[h8, h9, h10, 1, p41, p51, p61, p71]\n[h8, h9, h10, h11, p41 + 1, p51, p61, p71]\n\nAs can be seen, it is now impossible for iterators of different lengths to produce the same \"final state\" to be hashed which restores collision resistance. (See the following for more details [padding-in-sponge.pdf](https://github.com/user-attachments/files/24465342/padding-in-sponge.pdf))\n\n### Thanks\nMany thanks to Benedikt Wagner, Dmitry Khovratovich and Bart Mennink for reporting this issue.","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"Vulnerability Currently, when hashing, if the number of elements to hash is not a multiple of the rate, `hash_iter` pads by elements of the current state.","id":"GHSA-3g92-f9ch-qjcm","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"weak_cryptography","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":["0.5.2"],"package":"p3-symmetric","purl":null,"source":"GHSA-3g92-f9ch-qjcm"},{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":["0.5.2"],"package":"p3-symmetric","purl":"pkg:cargo/p3-symmetric","source":"GHSA-3g92-f9ch-qjcm"}],"products":null,"published":"2026-04-16","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":"An attacker can create hash collisions for inputs of different lengths in Plonky3, potentially bypassing integrity checks in cryptographic proofs.","url":"https://insights.sbomify.com/GHSA-3g92-f9ch-qjcm/"}