Hash: SHA256

             AUSCERT External Security Bulletin Redistribution

          iControl REST unauthenticated remote command execution
                       vulnerability CVE-2021-22986
                               29 March 2021


        AusCERT Security Bulletin Summary

Product:           F5 Products
Publisher:         F5 Networks
Operating System:  Network Appliance
Impact/Access:     Root Compromise                 -- Remote/Unauthenticated
                   Execute Arbitrary Code/Commands -- Remote/Unauthenticated
                   Create Arbitrary Files          -- Remote/Unauthenticated
                   Delete Arbitrary Files          -- Remote/Unauthenticated
                   Denial of Service               -- Remote/Unauthenticated
Resolution:        Patch/Upgrade
CVE Names:         CVE-2021-22986  

Original Bulletin: 

Revision History:  March 29 2021: Vendor updated advisory due to issues with recent fixes
                   March 11 2021: Initial Release

- --------------------------BEGIN INCLUDED TEXT--------------------

K03009991: iControl REST unauthenticated remote command execution vulnerability

Original Publication Date: 11 Mar, 2021
Latest   Publication Date: 28 Mar, 2021

Security Advisory Description

The iControl REST interface has an unauthenticated remote command execution
vulnerability. (CVE-2021-22986)


This vulnerability allows for unauthenticated attackers with network access to
the iControl REST interface, through the BIG-IP management interface and self
IP addresses, to execute arbitrary system commands, create or delete files, and
disable services. This vulnerability can only be exploited through the control
plane and cannot be exploited through the data plane. Exploitation can lead to
complete system compromise. The BIG-IP system in Appliance mode is also

Note: If you believe your system may have been compromised, refer to K11438344:
Considerations and guidance when you suspect a security compromise on a BIG-IP

Security Advisory Status

F5 Product Development has assigned ID 951705 and ID 954381 (BIG-IP) and ID
955145 (BIG-IP and BIG-IQ) to this vulnerability.

To determine if your product and version have been evaluated for this
vulnerability, refer to the Applies to (see versions) box. To determine if your
release is known to be vulnerable, the components or features that are affected
by the vulnerability, and for information about releases, point releases, or
hotfixes that address the vulnerability, refer to the following table. For more
information about security advisory versioning, refer to K51812227:
Understanding security advisory versioning.

|                   |      |Versions  |Fixes     |          |CVSSv3|Vulnerable|
|Product            |Branch|known to  |introduced|Severity  |score^|component |
|                   |      |be        |in        |          |1     |or feature|
|                   |      |vulnerable|          |          |      |          |
|                   |16.x  |16.0.0 -  |* |          |      |          |
|                   |      |16.0.1    |          |          |      |          |
|                   +------+----------+----------+          |      |          |
|                   |15.x  |15.1.0 -  |  |          |      |          |
|                   |      |15.1.2    |          |          |      |          |
|BIG-IP (LTM, AAM,  +------+----------+----------+          |      |          |
|Advanced WAF, AFM, |14.x  |14.1.0 -  |14.1.4*   |          |      |          |
|Analytics, APM,    |      |14.1.3    |          |          |      |iControl  |
|ASM, DDHD, DNS,    +------+----------+----------+Critical  |9.8   |REST API  |
|FPS, GTM, Link     |13.x  |13.1.0 -  |  |          |      |          |
|Controller, PEM,   |      |13.1.3    |          |          |      |          |
|SSLO)              +------+----------+----------+          |      |          |
|                   |12.x  |12.1.0 -  |**|          |      |          |
|                   |      |12.1.5    |          |          |      |          |
|                   +------+----------+----------+          |      |          |
|                   |11.x  |None      |Not       |          |      |          |
|                   |      |          |applicable|          |      |          |
|                   |8.x   |None      |8.0.0     |          |      |          |
|                   +------+----------+----------+          |      |          |
|BIG-IQ Centralized |7.x   |7.1.0     |   |          |      |iControl  |
|Management         |      |7.0.0     |   |Critical  |9.8   |REST API  |
|                   +------+----------+----------+          |      |          |
|                   |6.x   |6.0.0 -   |None      |          |      |          |
|                   |      |6.1.0     |          |          |      |          |
|F5OS               |1.x   |None      |Not       |Not       |None  |None      |
|                   |      |          |applicable|vulnerable|      |          |
|Traffix SDC        |5.x   |None      |Not       |Not       |None  |None      |
|                   |      |          |applicable|vulnerable|      |          |

*An issue with the Traffic Management Microkernel (TMM) process has been
discovered in versions and 14.1.4. For more information, refer to 
K37451543: TMM vulnerability CVE-2021-23007.

^**An issue with the bigd process has been discovered in version For
more information, refer to K50524736: Bigd process memory leak after updating

^1The CVSSv3 score link takes you to a resource outside of AskF5, and it is
possible that the document may be removed without our knowledge.

Recommended Actions

If you are running a version listed in the Versions known to be vulnerable
column, you can eliminate this vulnerability by installing a version listed in
the Fixes introduced in column. If the table does not list a fixed version for
your software branch, then no update candidate currently exists for that
branch, and F5 recommends upgrading to a version with the fix (refer to the

If the Fixes introduced in column lists a version prior to the one you are
running, in the same branch, then your version should have the fix. Refer to 
K51812227: Understanding security advisory versioning.

If you are using public cloud marketplaces (AWS, Azure, GCP, or Alibaba) to
deploy BIG-IP Virtual Edition (VE), F5 recommends that you install the latest
releases of BIG-IP versions listed in the Fixes introduced in column, subject
to their availability on those marketplaces. For more information, refer to the
following articles:

  o BIG-IP VE Supported Platforms
  o K84205182: BIG-IP upgrade guide | Chapter 1: Guide contents


Until it is possible to install a fixed version, you can use the following
sections as temporary mitigations. These mitigations restrict access to
iControl REST to only trusted networks or devices, thereby limiting the attack

  o Block iControl REST access through the self IP address
  o Block iControl REST access through the management interface

Block iControl REST access through the self IP address

You can block all access to the iControl REST interface of your BIG-IP system
through self IP addresses. To do so, you can change the Port Lockdown setting
to Allow None for each self IP address in the system. If you must open any
ports, you should use the Allow Custom option, taking care to disallow access
to iControl REST. By default, iControl REST listens on TCP port 443 or TCP port
8443 on single NIC BIG-IP VE instances. If you modified the default port,
ensure that you disallow access to the alternate port you configured.

Note: Performing this action prevents all access to the Configuration utility
and iControl REST using the self IP address. These changes may also impact
other services, including breaking high availability (HA) configurations.

Before you make changes to the configuration of your self-IP addresses, F5
strongly recommends that you refer to the following articles:

  o K17333: Overview of port lockdown behavior (12.x - 16.x)
  o K13092: Overview of securing access to the BIG-IP system
  o K31003634: The Configuration utility of the Single-NIC BIG-IP Virtual
    Edition now defaults to TCP port 8443
  o K51358480: The single-NIC BIG-IP VE may erroneously revert to the default
    management httpd port after a configuration reload

If you must expose port 443 on your self IP addresses and want to restrict
access to specific IP ranges, you may consider using the packet filtering
functionality built in to the BIG-IP system. For more information, refer to the
following article:

  o K13383: Configuring CIDR Network Addresses for the BIG-IP packet filter

Block iControl REST access through the management interface

To mitigate this vulnerability for affected F5 products, you should restrict
management access only to trusted users and devices over a secure network. For
more information about securing access to BIG-IP systems, refer to the
following articles:

  o K13092: Overview of securing access to the BIG-IP system
  o K46122561: Restricting access to the management interface using network
    firewall rules 
  o K69354049: Restricting access to the BIG-IP management interface for
    Configuration Utility and iControl REST services using iptables

Note: Restricting access to the management interface by IP address in httpd is
not a viable mitigation for this issue.

Indicators of compromise


Important: F5 last updated this section on March 26, 2021 at 5:45 PM

The information in this section describes evidence that F5 observed on
compromised devices. F5 believes this evidence is a reliable indicator. It is
important to note that exploited systems may show different indicators, and a
skilled attacker may be able to remove traces of their work. It is impossible
to prove a device is not compromised; when you have any uncertainty, consider
the device compromised.

All versions

  o F5 updates F5 iHealth with heuristics that flag indicators of compromise in
    uploaded QKView diagnostic files.

    Refer to K27404821: Using F5 iHealth to diagnose vulnerabilities for more
    information on using iHealth.

  o If you are unable to use iHealth to identify indicators of compromise, you
    may also perform the following check manually:
       Look for X-F5-Auth-Token doesn't have value in /var/log/restjavad.*.log

        To do so, enter the following command:

        zgrep -e "X-F5-Auth-Token doesn't have value" /var/log/restjavad.*.log 

        The command output may appear similar to the following example
        on devices that attackers attempted to compromise:

        /var/log/restjavad.0.log:[WARNING][2347][23 Mar 2021 08:58:30 UTC]
        [com.f5.rest.app.RestServerServlet] X-F5-Auth-Token doesn't have value,
        so skipping 

        Note: Under limited ordinary circumstances, it is possible that log
        entries containing the text X-F5-Auth-Token doesn't have value may
        appear in /var/log/restjavad.*.log. 

       When you see the X-F5-Auth-Token doesn't have value message, you can
        compare any logs found in /var/log/restjavad.*.log with those found in 
        /var/log/audit* and /var/log/restjavad-audit.*.log that
        share approximately the same timestamp.

        Use this comparison to determine the intent and potential impact of
        these logs. For example, you may see the following entries in these

        Entry in '/var/log/audit'

        Mar 23 00:58:30 hostname notice icrd_child[13385]: 01420002:5: AUDIT
        - pid=13385 user=admin folder=/Common module=(tmos)# status=[Command
        OK] cmd_data=run util bash -c id 

        Entry in '/var/log/restjavad-audit.0.log'

        [I][2348][23 Mar 2021 08:58:30 UTC][ForwarderPassThroughWorker]

        If the logs display any entries, this may indicate that a REST request
        with empty X-F5-Auth-Token value from IP address nnn.nnn.nnn.nnn
         invokes command run util bash -c id. You must closely examine the
        source IP addresses in any /var/log/restjavad-audit.*.log and /var/log/
        audit* entries and compare them to IP addresses you know make
        legitimate REST calls against the device.

  o Other indicators of compromise may include unexpected modifications to any
    files, configurations, or running processes. F5 has iHealth heuristics
    designed to detect the following:
       Unknown processes running (Heuristic H511618)
       When the Configuration utility iControl REST interface has been exposed
        to the Internet through the management interface (H444724)
       When a self IP address has Port Lockdown set to Allow All (H458565)

Additionally, refer to the following article:

  o K11438344: Considerations and guidance when you suspect a security
    compromise on a BIG-IP system for an overview

Note: A lack of log entries or heuristic reports does not categorically
indicate that a unit is not compromised. A skilled attacker can remove evidence
of compromise, including log files, following successful exploitation.

Supplemental Information

o K02566623: Overview of F5 critical vulnerabilities (March 2021)
  o K04532512: Frequently asked questions for CVE-2021-22986, CVE-2021-22987,
    CVE-2021-22988, CVE-2021-22989, and CVE-2021-22990
  o K41942608: Overview of security advisory articles
  o K4602: Overview of the F5 security vulnerability response policy
  o K4918: Overview of the F5 critical issue hotfix policy
  o K9502: BIG-IP hotfix and point release matrix
  o K13123: Managing BIG-IP product hotfixes (11.x - 16.x)
  o K15106: Managing BIG-IQ product hotfixes
  o K15113: BIG-IQ hotfix and point release matrix
  o K48955220: Installing an OPSWAT Endpoint Security update on BIG-IP APM
    systems (11.4.x and later)
  o K167: Downloading software and firmware from F5
  o K9970: Subscribing to email notifications regarding F5 products
  o K9957: Creating a custom RSS feed to view new and updated documents

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:


Australian Computer Emergency Response Team
The University of Queensland
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
Comment: http://www.auscert.org.au/render.html?it=1967