When Collaboration Becomes Vulnerable: Exposing SQL Injection

Sushant Soni
Westwing Tech Blog
Published in
2 min readNov 8, 2023

--

Introduction

In an era where collaboration is key to business agility, a popular document collaboration tool had its security compromised. Aimed at streamlining document review and approvals, this software unfortunately hosted a ticking time bomb within its digital walls, in the form of a SQL Injection vulnerability, threatening the integrity of the very documents it was meant to protect.

Discovery Process

The chase began with the Wappalyzer extension, which lays bare the technologies underpinning websites. A routine check unveiled that the site was running on OnlyOffice software v5.4.2. My curiosity was piqued when I realized that this version was obsolete and, more critically, had an associated CVE (Common Vulnerabilities and Exposures) entry, pointing towards a possible SQL Injection exploit.

Technical Details

Diving into the technical trenches, I confirmed the presence of CVE-2020–11537. The flaw could be exploited via the WebSocket API — an unexpected backdoor in an otherwise secure protocol. After some hands-on testing with crafted payloads, the vulnerability was unmistakable. An injected SQL command containing a sleep function delayed the response by 6 seconds, unequivocally demonstrating the security gap.

Exploitation

CVE-2020–11537: A SQL Injection issue was discovered in ONLYOFFICE Document Server 5.5.0. An attacker can execute arbitrary SQL queries via injection to DocID parameter of Websocket API.

In the DocID parameter, enter the payload ‘ union select 1,2 from pg_sleep(6); —

Impact Assessment

SQL Injection is like leaving the key to your front door under the mat. It could allow an attacker unfettered access to manipulate or retrieve sensitive data directly from the database, possibly leading to unauthorized data exposure, system compromise, and a loss of trust that can be hard to rebuild.

Reporting Process

The reporting process was a swift direct line to the organization. Their receptiveness to the vulnerability report was commendable, and the issue was patched in the following weeks, fortifying their digital defenses.

Conclusion and Learning

The lesson here is twofold: the relentless advancement of digital threats necessitates perpetual vigilance, and the importance of keeping software up to date cannot be overstated. Regular security audits are not just a good practice; they’re an imperative checkpoint in the marathon to keep cyber threats at bay.

--

--