Confused deputy attack

If a legitimate application requests dangerous permissions and then exposes a feature that uses that dangerous permission to the system, it allows any other application installed on the device to enjoy the permission without the need of requesting it. Let's say that a developer accidently left the permission android.permission.BIND_NOTIFICATION_LISTENER_SERVICE in an application release build and exposed that permission to other apps on the system. It is used to intercept all the notifications received by the system. This means the malware can read all notifications, modify them before sending to the user or even reply to them if needed even if it does not have the BIND_NOTIFICATION_LISTENER_SERVICE permission. This is known as the confused deputy problem.

In this example, the application is the deputy because it is acting at the request of the user. The application is seen as 'confused' because it was tricked into making a request on behalf of a malicious application.

Example

In 2019 the Google and Samsung Camera app was identified as vulnerable to the "Confused deputy attack". The applications exposed an unprotected feature that allowed another application to take pictures or videos through the Camera application.

Cards

Authentication & Authorization

Github logo View source on GitHub

OWASP Cornucopia

  • OWASP Cornucopia is a mechanism in the form of a card game to assist software development teams identify security requirements in Agile, conventional and formal development processes. It is language, platform and technology-agnostic, and is free to use.
  • OWASP Cornucopia is licensed under the Creative Commons Attribution-ShareAlike 3.0 license, so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar licence to this one.
  • © 2012-2025 OWASP Foundation. The Open Worldwide Application Security Project (OWASP) is a nonprofit foundation that works to improve the security of software.