GHSA-3hpf-ff72-j67p: Shared preferences android Shared_preferences_android Vulnerability Vulnerability

LOW
CVSS 3.0
CWE-502
Published
Advisory Summary

GHSA-3hpf-ff72-j67p is a LOW (CVSS 3.0) shared_preferences_android vulnerability vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Shared preferences android libraries in the Pub ecosystem. The issue involves shared_preferences_android vulnerability. Remediation is available by upgrading affected packages to version 2.3.4.

GHSA-3hpf-ff72-j67p at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-3hpf-ff72-j67p
Severity LOW
CVSS v3.1 Base Score 3.0
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Shared preferences android
Package Ecosystem Pub
Published Date
Last Updated

Security Impact

CVSS: 3.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix GHSA-3hpf-ff72-j67p

To remediate this vulnerability, upgrade all affected Shared preferences android dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

shared_preferences_android fixed: 2.3.4
Upgrade shared_preferences_android to 2.3.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for shared_preferences_android

How to Check if You Are Affected

To determine whether your application is affected by GHSA-3hpf-ff72-j67p, inspect your project dependencies for Shared preferences android:

inspect dependencies for shared_preferences_android

Analyze the terminal output to locate any version of Shared preferences android in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Shared preferences android, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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!

GHSA-3hpf-ff72-j67p Affected Shared preferences android Versions

1 component(s)
Fixed Versions:
2.3.4
Product / Package Ecosystem Affected Versions Fixed Version
shared_preferences_android
Pub
≥ 2.3.3
< 2.3.4
All 1 versions
2.3.3
2.3.4

References

Frequently Asked Questions

What is GHSA-3hpf-ff72-j67p?
GHSA-3hpf-ff72-j67p is a security vulnerability in Shared preferences android involving shared_preferences_android vulnerability under CWE-502: Deserialization of Untrusted Data.
Which Shared preferences android versions are affected?
Affected versions include releases prior to 2.3.4 across affected packages: shared_preferences_android.
What version fixes GHSA-3hpf-ff72-j67p?
Upgrading to 2.3.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shared_preferences_android affected?
Yes, shared_preferences_android is affected in releases prior to 2.3.4. Upgrade your dependency to 2.3.4 or later.
What is the CVSS score of GHSA-3hpf-ff72-j67p?
GHSA-3hpf-ff72-j67p has a CVSS v3.1 base score of 3.0 (LOW) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with GHSA-3hpf-ff72-j67p?
GHSA-3hpf-ff72-j67p is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Pub dependencies for GHSA-3hpf-ff72-j67p?
Run the dependency tree command: 'inspect dependencies for shared_preferences_android'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3hpf-ff72-j67p",
  "modified" : "2024-12-06T21:24:30Z",
  "published" : "2024-12-06T21:24:30Z",
  "aliases" : [ ],
  "summary" : "shared_preferences_android vulnerability",
  "details" : "### 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!",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Pub",
      "name" : "shared_preferences_android"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.3"
      }, {
        "fixed" : "2.3.4"
      } ]
    } ],
    "versions" : [ "2.3.3" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/flutter/packages/security/advisories/GHSA-3hpf-ff72-j67p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flutter/packages/commit/15501ece235684a3bdddad089345fc3e33dc1df3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/flutter/packages"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-06T21:24:30Z",
    "nvd_published_at" : null
  }
}