{"answers":{"affected":"2 open source packages ship an affected version, including shared_preferences_android.","exploited":"There is no known exploitation of GHSA-3hpf-ff72-j67p in the wild and no public exploit code.","fix":"Upgrade shared_preferences_android to 2.3.4 or later.","what":"GHSA-3hpf-ff72-j67p is an unsafe deserialization vulnerability in shared_preferences_android, published on 6 Dec 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-3hpf-ff72-j67p and fix it if it is affected.\n\nWhat it is: GHSA-3hpf-ff72-j67p is an unsafe deserialization vulnerability in shared_preferences_android, published on 6 Dec 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-3hpf-ff72-j67p in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- shared_preferences_android (Pub): affected from 2.3.3; fixed in 2.3.4\n- shared_preferences_android (Pub): affected from 2.3.3; fixed in 2.3.4\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-3hpf-ff72-j67p/ (Markdown: https://insights.sbomify.com/GHSA-3hpf-ff72-j67p/index.md)","id":"GHSA-3hpf-ff72-j67p","markdown":"https://insights.sbomify.com/GHSA-3hpf-ff72-j67p/index.md","name":"GHSA-3hpf-ff72-j67p","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Flutter Android library","requires_auth":"none","summary":"An attacker with local file write access can overwrite preference files to trigger arbitrary code execution via unsafe deserialization in the shared_preferences_android library.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nDue to some data types not being natively representable for the available storage options, shared_preferences_android serializes and deserializes special string prefixes to store these unrepresentable data types. This allows arbitrary classes to be deserialized leading to arbitrary code execution.\n\nAs a result, Files containing the preferences can be overwritten with a malicious one with a deserialization payload that triggers as soon as the data is loaded from the disk.\n\n### Patches\n2.3.4\n\n### Workarounds\nUpdate to the latest version of shared_preferences_android that contains the changes to address this vulnerability.\n\n### References\nTBD\n\n### For more information\nSee [our community page](https://dart.dev/community) to find ways to contact the team.\n\n### Thanks\nThank you so much to Oskar Zeino-Mahmalat from sonarsource for finding and reporting this issue!","ecosystems":["Pub"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"shared_preferences_android vulnerability","id":"GHSA-3hpf-ff72-j67p","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":null,"product":null,"products":[],"type":"deserialization","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Pub","fixed":["2.3.4"],"introduced":["2.3.3"],"last_affected":[],"package":"shared_preferences_android","purl":null,"source":"GHSA-3hpf-ff72-j67p"},{"ecosystem":"Pub","fixed":["2.3.4"],"introduced":["2.3.3"],"last_affected":[],"package":"shared_preferences_android","purl":"pkg:pub/shared_preferences_android","source":"GHSA-3hpf-ff72-j67p"}],"products":null,"published":"2024-12-06","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 with local file write access can overwrite preference files to trigger arbitrary code execution via unsafe deserialization in the shared_preferences_android library.","url":"https://insights.sbomify.com/GHSA-3hpf-ff72-j67p/"}