Skip to content
Info disclosure Advisory Advanced CVE-2019-5134

WAGO PFC100/200 Web-Based Management (WBM) Authentication Regex Information Disclosure Vulnerability

The login page used an unanchored regular expression to match the username against password file lines, so a crafted username could match unintended entries. An attacker could then use a timing attack to disclose the password hash and salt.

Patrick DeSantis Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

An exploitable regular expression without anchors vulnerability exists in the Web-Based Management (WBM) authentication functionality of WAGO PFC100/200 controllers. A specially crafted authentication request can bypass regular expression filters, resulting in sensitive information disclosure.

Patrick DeSantis and Lilith [-_-];, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The regular expression used to match the username was not anchored at the start and end, allowing wildcard and other pattern characters to match unintended lines in the password file.

Impact

An attacker could disclose the full salt and password hash, potentially leading to further compromise.

What the attacker needed

Network access to the web management interface; no authentication required

How it was found

  1. Send a crafted username such as one containing regex wildcards to the login endpoint.
  2. Observe that the regex matches the admin line in the password file.
  3. Append a tested character and a comment character to the username to test each character of the hash.
  4. Use the PHP crypt() timing attack to determine if the character is a match.
  5. Repeat to disclose the full salt and password hash.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

The login code checked usernames with a pattern that wasn't strict about where the match started, so a username like 'adm*in' could match 'admin'. By measuring how long the server took to respond, an attacker could guess the stored password hash character by character.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Patrick DeSantis

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.