Rapid7 Vulnerability & Exploit Database

UniFi Network Application Unauthenticated JNDI Injection RCE (via Log4Shell)

Back to Search

UniFi Network Application Unauthenticated JNDI Injection RCE (via Log4Shell)

Disclosed
12/09/2021
Created
01/22/2022

Description

The Ubiquiti UniFi Network Application versions 5.13.29 through 6.5.53 are affected by the Log4Shell vulnerability whereby a JNDI string can be sent to the server via the 'remember' field of a POST request to the /api/login endpoint that will cause the server to connect to the attacker and deserialize a malicious Java object. This results in OS command execution in the context of the server application. This module will start an LDAP server that the target will need to connect to.

Author(s)

  • Spencer McIntyre
  • RageLtMan <rageltman@sempervictus>
  • Nicholas Anastasi

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/ubiquiti_unifi_log4shell
msf exploit(ubiquiti_unifi_log4shell) > show targets
    ...targets...
msf exploit(ubiquiti_unifi_log4shell) > set TARGET < target-id >
msf exploit(ubiquiti_unifi_log4shell) > show options
    ...show and set options...
msf exploit(ubiquiti_unifi_log4shell) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;