Mobile application security

Unsafe parsing and deserialisation of mobile input

Unsafe parsing and deserialisation of mobile: phone, filter, code arranged to illustrate unsafe parsing and deserialisation of mobile input.

Mobile input can arrive through files, links, network messages and other applications. Understanding unsafe parsing and deserialisation of mobile input helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

A software dependency becomes part of the application's effective behaviour and maintenance commitment. The important inventory is what the release actually contains, including transitive packages, bundled binaries and code that arrives through a build or update process.

Android apps can reconstruct objects from serialized data received through platform mechanisms such as Intent extras, Bundle values, IPC payloads, files, or network responses. If the app deserializes data from these sources without restricting the allowed classes or validating the input before use, the deserialisation logic can introduce unintended application behaviour or unsafe state changes.

Android applications can share structured data via ContentProvider components. However, if these providers create SQL queries using untrusted input from URIs without adequate validation or parameterization, they risk becoming susceptible to SQL injection attacks.

Why it matters

Consider a realistic failure: a malformed import reaches an unsafe parser and changes application state.

A compromised or vulnerable component may run with the application's privileges or receive information the business did not expect to share. Impact depends on reachability, permissions and actual data flows rather than a package name alone.

Mobile behaviour can change between a fresh installation, an authenticated session, background activity and a device migration. The assessment needs the actual release and representative supported device states.

How penetration testers check for it

Trace input to parsers, deserialisers and native memory operations.

  • Untrusted user input (e.g., from getPathSegments) is directly concatenated into SQL statements.
  • Check whether the returned data comes from Intent.getData, ClipData, extras, or ContentProvider metadata.
  • Check whether the returned data is controlled by an external responder.
  • Check whether the returned data affects file handling, content parsing, storage, navigation, backend requests, authorisation decisions, account selection, transaction flows, or other security-relevant logic.
  • Inspect transitive dependencies and unexpected runtime activity.
  • Confirm whether affected code is reachable under realistic conditions.

How to fix it

Use safe parsers, explicit schemas and bounded processing before sensitive actions.

  • Use maintained and appropriately trusted dependencies.
  • Pin and review relevant changes in the delivery process.
  • Remove unnecessary components and reduce their permissions.
  • Verify remediation in the shipped release and its supporting artefacts.

A vulnerability identifier is a starting point for investigation. Version evidence, affected functionality and deployment conditions determine whether it creates a confirmed application risk.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss your mobile applications.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo