2021-04 - SQL Injection in the REST API Endpoint (CVE-2021-31818)

Advisory Number


Discovery Date

Patch Release Date

Advisory Release Date


Octopus Server

Operating System







Customers who have downloaded and installed any of the Octopus Server versions listed below (“Details”) are affected.

Please upgrade your Octopus Server immediately to fix this vulnerability.

Customers who have upgraded Octopus Server to version 2021.1.7316 or higher are not affected.


Octopus Deploy has given this vulnerability a High rating. This rating was given according to the Octopus Deploy security levels, which ranks vulnerabilities as critical, high, medium, or low severity.

This is our assessment and you should evaluate its applicability to your own environment.


Affected versions of Octopus Server are prone to an authenticated SQL injection vulnerability in the Events REST API because user supplied data in the API request isn’t parameterised correctly. Exploiting this vulnerability could allow unauthorised access to database tables.

The versions of Octopus Server affected by this vulnerability are:

  • All 2018.9.17, 2018.10.x, 2018.11.x, 2018.12.x versions

  • All 2019.x.x, 2020.1.x, 2020.2.x, 2020.3.x, 2020.4.x, 2020.5.x versions

  • All 2020.6.x versions before 2020.6.5146

  • All 2021.1.x versions before 2021.1.7316


To address this vulnerability, we have released Octopus Server versions which contain a fix for this vulnerability:

  • 2020.6.5146

  • 2021.1.7316

The latest versions of Octopus Deploy products can be downloaded from and previous versions can be downloaded from

What You Need to Do

Octopus Deploy recommends that you upgrade to the latest version (2021.1.7316). You can download the latest version of Octopus Server from

If you can’t upgrade to the latest version (2021.1.7316):

If you have feature version…

…then upgrade to this version

2018.9.17, 2018.10.x, 2018.11.x, 2018.12.x, 2019.x.x, 2020.1.x, 2020.2.x, 2020.3.x, 2020.4.x, 2020.5.x







If you are unable to patch your Octopus Server installations you can effectively mitigate this vulnerability by removing the EventView permission from roles. You can test which users have the EventView permissions by navigating to Configuration → Test Permissions and selecting a user from the drop down.

Although this mitigation is effective in preventing this vulnerability customers may experience some error messages when navigating to certain pages however, these errors do not prevent users from general use of the application. If this mitigation is used the audit log will not be accessible unless the user account has the EventView permissions, a link for further information about the audit log can be found below.

The following links provide further information for creating and managing roles, testing user permissions and audit log access:


If you have any questions or concerns regarding this advisory, please contact our support team (

Exploitation and Public Announcements

The Octopus Deploy security team is not aware of any public announcements or malicious use of the vulnerability that is described in this advisory.


This vulnerability was found by Justin Steven (,

Revision History

Version Date Comment
Current Version (v. 13) Jun 13, 2021 23:34 @a user
v. 12 Jun 10, 2021 05:31 @a user
v. 11 Jun 10, 2021 04:30 @a user
v. 10 Jun 03, 2021 06:44 @a user
v. 9 Jun 03, 2021 06:43 @a user
v. 8 Jun 03, 2021 05:55 @a user
v. 7 Jun 03, 2021 05:54 @a user
v. 6 Jun 03, 2021 05:46 @a user
v. 5 Jun 03, 2021 05:42 @a user
v. 4 Jun 03, 2021 05:42 @a user
v. 3 Jun 03, 2021 04:58 @a user
v. 2 Jun 03, 2021 04:26 @a user
v. 1 Jun 03, 2021 04:26 @a user