Skip to content
Back to blog

The Login Page That Can't Keep Its Address a Secret (CVE-2026-78751)_

· 3 min read

TL;DR

Pluck CMS 4.7.20 running on PHP 8 leaks its full server filesystem path to anyone who asks nicely, no login required. Send the login form's password field as an array instead of a string (cont1[]=anything) and PHP 8's stricter hash() function throws an uncaught TypeError. The resulting fatal-error message is returned in the HTTP response and happily spells out the absolute path of login.php, for example /var/www/html/login.php:56. It's a medium-severity information disclosure (CVSS 5.3, CWE-209) that gives attackers a free map of your server before they've even guessed a password.

A login form with a slightly oversharing streak

Most login pages are tight-lipped by design. You type a username and password, the server checks them, and it tells you as little as possible about what happened behind the scenes. "Wrong credentials" is about as chatty as a good one should ever get.

Pluck CMS is a small, friendly flat-file CMS, and its login page follows the usual script. You submit cont1 (the password), it gets hashed, and the hash is compared against the stored value. Normal, boring, correct.

The trouble starts when the login page is asked a question its author never anticipated: what happens if the password isn't a string at all?

Where the trust assumption breaks

Here's the assumption baked into login.php: whatever arrives in $_POST['cont1'] is a string. In data/inc/variables.all.php, $cont1 is assigned straight from $_POST['cont1'] with no type checking. Line 56 of login.php then does the hashing:

hash('sha512', $cont1);

That's fine, right up until someone submits cont1 as an array. HTML forms and HTTP both allow it: cont1[]=anything arrives as a PHP array, not a string.

Under PHP 7, this was harmless in an embarrassing-but-quiet way: hash() would just return false when handed an array and move on. PHP 8 is stricter. It insists the second argument to hash() is genuinely a string, and when it isn't, it throws a TypeError. Pluck doesn't catch it. So the exception bubbles all the way up and becomes a fatal error.

Under the bonnet

The proof of concept is a single unauthenticated request:

curl -s -X POST http://target/login.php \
  -d 'cont1[]=anything&bogus=&submit=Log+in'

On a Pluck 4.7.20 install running PHP 8, the response body contains:

Fatal error: Uncaught TypeError: hash(): Argument #2 ($data) must be
of type string, array given in /var/www/html/login.php:56

This was confirmed on Pluck CMS 4.7.20 with PHP 8.2.31. The interesting part isn't that it crashes. It's what the crash says out loud.

That error message names the absolute path of login.php. In one line it reveals:

  • The document root (/var/www/html), which tells an attacker exactly where web-accessible files live.
  • The directory layout, which hints at the webserver user's home and how the install is arranged.
  • Confirmation, via the login.php path, that this really is a Pluck installation.

No credentials. No prior knowledge. Just a malformed field and a server that answers honestly.

Why it matters

On its own, a disclosed path doesn't hand anyone your data. That's why this sits at CVSS 5.3 (Medium), classified as CWE-209, Generation of Error Message Containing Sensitive Information. The confidentiality impact is low and there's no direct effect on integrity or availability.

But reconnaissance is rarely the end of the story. Knowing the absolute filesystem path is exactly the ingredient that turns several other bug classes from "theoretically exploitable" into "point and shoot". Local file inclusion, path traversal, and absolute-path injection attacks all get easier when the attacker already knows where the webroot sits and how the directories are named. A quiet medium today is often the enabler for something louder tomorrow.

It's also worth noting this is a PHP 8 story specifically. The same code on PHP 7 fails silently. Upgrading the PHP runtime, normally an unambiguously good move, is what flips this latent sloppiness into an actual disclosure.

How to fix it

The root cause is a missing type check, and the fix is correspondingly simple. Before anything reaches hash(), confirm the input is actually a string:

if (!is_string($cont1)) {
    // reject the request or treat as a failed login
}

More broadly, there are two defensive moves worth making together:

  1. Validate input types at the boundary. Treat everything in $_POST as hostile and shaped however the sender felt like. A field you expect to be a string can arrive as an array, and your code should decide what that means rather than letting PHP decide for you with a fatal error.
  2. Never return raw PHP errors to clients in production. Set display_errors = Off and log errors server-side instead. Even a perfectly type-checked application will occasionally throw something unexpected, and the client is the last place that stack trace should land.

Closing thought

This one is a neat reminder that "upgrade your runtime" and "handle your inputs" are two halves of the same job. The Block8.ai Security Research Team found that a CMS which behaved itself on PHP 7 started quietly leaking its own address the moment it ran on PHP 8, all because a password field was trusted to be a string. The bug is small. The lesson, that unvalidated input plus verbose errors equals free reconnaissance, is not.

Keep reading

AI-Powered Penetration Testing

Built to move: why portability is part of sovereignty

Most conversations about sovereignty focus on where data sits today. The harder question is what happens tomorrow. What if your provider changes its terms? What if a new policy bans

3 min read

Faster. Smarter. Simpler_

Block8.ai delivers AI-powered penetration testing, validated by CREST-certified experts, from $5K.

Start testing

AI-Powered Penetration Testing for Everyone_