# GHSA-3hpf-ff72-j67p: shared_preferences_android vulnerability

- Severity: Low 3.0 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-12-06T21:24:30.000Z
- Modified: 2024-12-06T21:24:30.000Z
- Weaknesses: CWE-502

## Description

### Impact
Due 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.

As 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.

### Patches
2.3.4

### Workarounds
Update to the latest version of shared_preferences_android that contains the changes to address this vulnerability.

### References
TBD

### For more information
See [our community page](https://dart.dev/community) to find ways to contact the team.

### Thanks
Thank you so much to Oskar Zeino-Mahmalat from sonarsource for finding and reporting this issue!

(As written by GitHub Advisory Database.)

## Affected

- shared_preferences_android (Pub): from 2.3.3 before 2.3.4

## References

- <https://github.com/flutter/packages/security/advisories/GHSA-3hpf-ff72-j67p> (web)
- <https://github.com/flutter/packages/commit/15501ece235684a3bdddad089345fc3e33dc1df3> (web)
- <https://github.com/flutter/packages> (package)

## Sources

- GitHub Advisory Database: [GHSA-3hpf-ff72-j67p](https://github.com/advisories/GHSA-3hpf-ff72-j67p), CC-BY-4.0, modified 2024-12-06

---

Page: https://cve.day/GHSA-3hpf-ff72-j67p · Whole record: https://cve.day/GHSA-3hpf-ff72-j67p.json · Rebuilt by cve.day 2026-11-25T22:56:33.455Z
