Skip to main content

One Old Flaw, Full Control: A Penetration Testing Case Study

With no account and no password, the Grintec team chained three Critical flaws into full control of the client's source-code server. Everything was proven under controlled conditions, without damaging or altering any data.

Client
Withheld under NDA

With no account and no password, the Grintec team reached the client’s source-code server all the way to administrator level. It all started with a single old flaw that had never been patched.

At a glance

In a single penetration testing engagement, the Grintec team found three Critical vulnerabilities. Each one is dangerous on its own. Chained together, they hand an unauthenticated attacker full control of the client’s source-code server. Everything was proven under controlled conditions, without damaging or altering any data.

The attack chain

The danger lies in how the three flaws connect. The diagram below shows the four steps, starting from a position with no account at all.

Attack chain: four steps from no account to administrator

Each step opens the door to the next. Breaking just one link is enough to stop the whole attack.

Finding 1: Remote Code Execution in GitLab

Severity: Critical, no login required

The client’s GitLab server was still running an old version vulnerable to a flaw public since 2021. It lets anyone on the internet run commands on the server simply by uploading a single modified image file.

GitLab RCE: an upload turns into command execution

Our team obtained a shell on the server, then read the configuration file holding the application’s secret keys, the very keys used to encrypt data and sign access tokens.

Finding 2: SQL Injection in the Helpdesk

Severity: Critical, no login required

The client’s helpdesk ran an old version that no longer receives security support. One of its public endpoints did not check input types correctly: normal input was rejected, but input sent as an array slipped into the database query.

SQL Injection: array-shaped input bypasses validation

To prove impact without breaking anything, our team read only the minimum information, such as the database name and server version. No tickets, customer data, or credentials were taken.

Finding 3: Administrator session hijacking

Severity: Critical, follows from Finding 1

Using the access from the first finding, our team discovered that the server’s session store could be read without authentication. It held the active session IDs of the administrators.

Session hijacking: a session ID is stolen then replayed

By replaying one of those session IDs in a browser, our team logged in as an administrator with no password and without passing 2FA. Testing was limited to proving access only, without changing any settings.

How to close the gaps

Each finding came with layered remediation: a quick mitigation to contain the attack, then a permanent fix that closes the gap.

Remediation: immediate steps and permanent fixes

Two habits would have prevented all three flaws: updating software regularly and hardening internal configuration, including on the supporting applications that are so often forgotten.

Lessons and next steps

Lessons from this case:

  • Old flaws stay dangerous. CVEs that are years old remain a primary entry point because the patch is never applied.
  • Supporting apps get forgotten. Helpdesks and internal tools are rarely updated, yet they connect to important data.
  • 2FA is not a guarantee. If an active session can be stolen, passwords and 2FA can be bypassed entirely.

The Grintec penetration testing team can look for flaws like these in your systems before an attacker does. Each finding comes with proof and recommendations your IT team can act on right away.

Have a system that needs building, connecting, or securing?

Tell us where your systems stand today, and we will work out a sensible first step together.

Let's Discuss