IPMEye: Exfiltrating IPMI credentials in Zabbix
A low-privileged Zabbix user could query the jsrpc.php multiselect endpoint with a filter on the ipmi_password column, and the server returned a true/false result depending on whether the guessed password matched. This allowed enumeration of cleartext IPMI passwords and other hidden credential fields.
medium.com
Published on medium.com
Cybersecurity
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.
Context
Zabbix is a monitoring platform whose web interface uses auto-complete fields and dropdown menus. Those widgets talk to the jsrpc.php endpoint, which exposes methods such as multiselect.get. The method takes an object_name (for example hosts) and a filter array used to search for hostnames, so the UI can suggest matching hosts as the user types.
That search feature is the subject of this write-up. The researcher found that the same filter mechanism can be pointed at columns the user should never be able to query, including the ipmi_password column of the hosts table, and that the server's answer leaks the value one guess at a time.
Setup
The report describes two roles:
- An administrator, who edits a monitored host and sets an IPMI password on it.
- A low-privileged monitoring user, who has read permissions for the host's group. Such a user is only allowed to see basic host statistics like CPU and RAM usage.
The researcher works black-box first, through the web interface, then moves to source review. The request below is the one that drew attention, a normal auto-complete call searching for hosts whose name matches Zabbix:
method=multiselect.get&object_name=hosts&filter[name]=Zabbix
No specific Zabbix version is given in the report.
Finding it
The researcher noticed that auto-complete fields and dropdown menus communicate with jsrpc.php, and that one request using the multiselect.get method passed a filter array to search for hostnames. Reviewing vjsrpc.php led to the question of how the backend validates that input, and then into the source code, at the point where the API constructs SQL queries from user input.
Zabbix relies on a large, centralised database schema array, found in schema.inc.php or returned by DB::getSchema(). The array maps every table and column in the application. The schema for the hosts table, as quoted in the report, is:
'hosts' => [ 'key' => 'hostid', 'fields' => [ 'hostid' => [ 'null' => false, 'type' => DB::FIELD_TYPE_ID, 'length' => 20 ], 'host' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, 'length' => 128 ], 'ipmi_password' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, 'length' => 20, 'default' => '' ], 'tls_psk' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, 'length' => 512, 'default' => '' ], ]]
When the dbFilter() function processes the user-supplied filter array, its only job is to check that the provided column name exists in that schema array. For a request such as filter[ipmi_password]=someting, the backend logic is described as follows:
- "Does the
hoststable exist? Yes." - "Does the
ipmi_passwordcolumn exist in the schema for thehoststable? Yes." - "Does the user have read access to this host? Yes."
The researcher's point is that there is no access control at the column level: the application never asks whether the user is authorised to query the ipmi_password column.
The input is escaped properly, so this is not SQL injection, and the query itself is safe and valid. The API also strips sensitive fields from the final JSON response using unsetExtraFields, so the password cannot simply be read out of the response body. The researcher initially suspected SQL injection because the behaviour affects the database and happens inside a database query, but concluded it is a Broken Access Control (BAC) issue.
Exploitation
Step 1: Plant a known secret
As an administrator, edit a monitored host and set an IPMI password. This gives the attacker a value to test against.
Step 2: Switch to the low-privileged account
Log in as a low-privilege user that has read permissions for the host's group. This is the account that will perform the enumeration.
Step 3: Send the filter request
Send the following POST request. The report notes that Content-Type: application/x-www-form-urlencoded is enforced in order to bypass the JSON parameter validations; otherwise the response is always empty.
POST /zabbix/jsrpc.php?type=11 HTTP/1.1Host: <ZABBIX_HOST>Content-Type: application/x-www-form-urlencoded Cookie: zbx_session=<LOW_PRIV_SESSION_COOKIE>method=multiselect.get&object_name=hosts&filter[ipmi_password]=<password attempt>
The request calls multiselect.get on the hosts object and puts the guessed password into filter[ipmi_password]. The session cookie belongs to the low-privileged user.
Step 4: Read the boolean answer
The response acts as a true/false indicator. If the host ID is returned, the guess is correct; if an empty array is returned, it is wrong.
True response example:
{"jsonrpc":"2.0","result":[{"name":"Zabbix server","id":"10084"}]}
False response example:
{"jsonrpc":"2.0","result":[]}
By repeating the request with different values in filter[ipmi_password], the low-privileged user can test candidate passwords without ever seeing the stored value in a response.
Root cause
The dbFilter() function treats the schema array as the only gate: if the column exists in the schema for the requested table, it is accepted into the WHERE clause. There is no check that the requesting user is allowed to filter on that particular column. The query is built safely, with the input escaped, so SQL injection defences hold; the missing piece is authorisation at the column level.
The response filtering (unsetExtraFields) removes sensitive fields from the JSON output, which prevents direct disclosure, but it does not prevent the value from influencing which rows match. That difference between "can I read the field" and "can I ask questions about the field" is what turns the auto-complete endpoint into an oracle.
Impact
Low-privileged users can exfiltrate restricted, cleartext hardware and service passwords through enumeration. The report states that this can lead to physical infrastructure compromise and lateral movement. The issue affects all hidden credential fields that exist as database table objects in schema.inc.php, not only ipmi_password.
The report gives CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H = 8.5.
An exploit repository is published at https://github.com/dennywise/IPMEye.
Fix
The report does not describe a patch or a code change. Based on the root cause, the fix would be to enforce column-level authorisation in dbFilter() (or before it), so that a filter on a sensitive column such as ipmi_password or tls_psk is rejected for users who are not authorised to query it, rather than relying on response filtering to hide the value.
Variants to test
What happened, in plain words
Zabbix is a piece of software that companies use to keep an eye on their computers and network equipment. It has a web interface, the kind of page you open in a browser, where an administrator can add machines to watch and see graphs of things like processor load or memory use. Part of that interface is helpful: when you start typing a hostname into a search box, a list of matching names drops down before you finish typing. That convenience is what this report is about.
The researcher found that the same search box can be pointed at a field it was never meant to search: the stored password Zabbix uses to talk to a server's IPMI interface. IPMI is a separate management channel built into many servers, and it has its own password. A normal, low-privileged user is not supposed to see that password. But the researcher discovered that such a user can ask the server a yes/no question: "is the IPMI password of this host equal to this guess?" The server answers truthfully, one guess at a time, without ever showing the password itself. That is enough to work out the password by trying values over and over.
The researcher first thought this was SQL injection, a well-known bug where an attacker sneaks database commands into an input field. It turned out not to be that. The database query is built safely. What is missing is a permission check on individual columns of the database, so the report calls it Broken Access Control. The rest of this article walks through how the researcher found it, how the request works, and why it matters, explaining each idea from scratch as it comes up.
Background: the pieces involved
Before the steps make sense, here are the moving parts, in everyday terms.
- A web interface is the pages you see in your browser. Behind those pages sits a server, a program on a remote machine that answers the browser's requests.
- An API (Application Programming Interface) is a way for one program to talk to another in a structured way. Think of it as a service counter: you hand over a form with specific fields filled in, and the clerk behind the counter hands back a reply. The browser's JavaScript uses an API to fetch data without reloading the whole page.
- An endpoint is one specific address on that counter, one URL that accepts one kind of request. In Zabbix, one important endpoint is
jsrpc.php. - JSON is a text format for structured data, easy for programs to read. It looks like
{"name": "value"}. API replies are often JSON. - A cookie is a small piece of text your browser stores and sends back to a site on every request. It is how a website remembers that you are logged in. A session cookie is the specific cookie that identifies your logged-in session. If someone else has your session cookie, the server treats them as you.
- A database is where the application stores its data in tables, like spreadsheets. Each table has rows (records) and columns (fields). Zabbix keeps its hosts in a table called
hosts, and one of its columns isipmi_password. - SQL is the language used to ask a database questions. A typical question is "give me the rows where this column equals this value".
- SQL injection is a bug where user input is pasted into an SQL query so carelessly that the user can change the query's meaning. It is a classic and serious flaw.
- Broken Access Control (BAC) is a different class of bug: the software does what it is asked, correctly and safely, but it fails to check whether the person asking is allowed to ask. The lock works; nobody checked who has the key.
- A boolean is simply true or false. A boolean oracle is any feature that will tell you true or false about a secret, which lets you learn the secret by asking many questions.
The feature that drew attention
Zabbix's web interface has auto-complete fields and dropdown menus. When you type into one, the page quietly sends a request to the server asking for suggestions. Those widgets talk to the jsrpc.php endpoint, which offers methods such as multiselect.get. That method takes an object_name (for example hosts) and a filter array used to search for hostnames, so the interface can suggest matching hosts as you type.
A filter array is just a list of conditions in the request, written like filter[name]=Zabbix, meaning "only rows whose name column equals Zabbix". The request below is the ordinary auto-complete call that first caught the researcher's eye, searching for hosts whose name matches Zabbix:
method=multiselect.get&object_name=hosts&filter[name]=Zabbix
Line by line:
method=multiselect.gettells the endpoint which operation to perform. Here it is the multi-select lookup used by the dropdown.object_name=hostssays which kind of thing to search, in this case hosts.filter[name]=Zabbixis the search condition: only return hosts whosenamecolumn equalsZabbix.
Nothing here is malicious. The researcher's instinct was to ask a simple question: if the filter can name a column, what stops someone from naming a column they should not be allowed to search? That question is the seed of the whole finding.
Looking at the source code
The researcher started black-box, meaning by using the web interface like any normal user, without seeing the code. Noticing that auto-complete fields and dropdown menus communicate with jsrpc.php, and that one request used multiselect.get with a filter array to search hostnames, led to reviewing vjsrpc.php. That raised the question of how the backend validates the input, and pushed the researcher into the source code, right to the point where the API constructs SQL queries from what the user sent.
There, the researcher found that Zabbix relies on a large, centralised database schema array, found in schema.inc.php or returned by DB::getSchema(). A schema is a description of the database's shape: which tables exist, which columns each table has, and what type of data each column holds. Zabbix keeps this description in one big array so the code can check names against it. The schema for the hosts table, as quoted in the report, is:
'hosts' => [ 'key' => 'hostid', 'fields' => [ 'hostid' => [ 'null' => false, 'type' => DB::FIELD_TYPE_ID, 'length' => 20 ], 'host' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, 'length' => 128 ], 'ipmi_password' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, 'length' => 20, 'default' => '' ], 'tls_psk' => [ 'null' => false, 'type' => DB::FIELD_TYPE_CHAR, 'length' => 512, 'default' => '' ], ]]
What this says, in plain words:
'hosts' => [...]starts the description of thehoststable.'key' => 'hostid'names the column that uniquely identifies each row, like a row number.'fields' => [...]lists the columns of the table.'hostid'is an identifier column, a number up to 20 digits long, and it cannot be empty ('null' => false).'host'is the hostname, text (DB::FIELD_TYPE_CHAR) up to 128 characters.'ipmi_password'is the IPMI password, text up to 20 characters, defaulting to an empty string. This is the sensitive column.'tls_psk'is a pre-shared key used for TLS encryption, text up to 512 characters, also defaulting to empty. This is another sensitive column.
The important observation is that the schema lists these sensitive columns right alongside ordinary ones. It describes them; it does not say who may search them.
Why the filter accepts the password column
When the dbFilter() function processes the user-supplied filter array, its only job is to check that the provided column name exists in that schema array. For a request such as filter[ipmi_password]=someting, the backend logic is described as follows:
- "Does the
hoststable exist? Yes." - "Does the
ipmi_passwordcolumn exist in the schema for thehoststable? Yes." - "Does the user have read access to this host? Yes."
The researcher's point is that there is no access control at the column level: the application never asks whether the user is authorised to query the ipmi_password column. Step 3 checks access to the host as a whole, not to each field within it. A low-privileged monitoring user is allowed to see basic host statistics like CPU and RAM usage, so the host check passes, and the password column slips through with it.
The input is escaped properly, so this is not SQL injection, and the query itself is safe and valid. Escaping means making user input harmless before it goes into a query, for example by neutralising characters that would otherwise change the query's meaning. Because that is done correctly, the attacker cannot rewrite the query. They can only supply a value to compare against.
The API also strips sensitive fields from the final JSON response using unsetExtraFields, so the password cannot simply be read out of the response body. In other words, even though the query runs, the reply is cleaned before it reaches the browser, and the password value is removed. The researcher initially suspected SQL injection because the behaviour affects the database and happens inside a database query, but concluded it is a Broken Access Control issue.
Turning the search into a yes/no question
Here is the step that makes the bug exploitable. The researcher put password guesses into the filter array, filter[ipmi_password]=guess, and the response became a true/false indicator. If it returns the host ID, that means true. If it returns an empty array, that means false. So, just like that, an innocent auto-complete endpoint turned into a data exfiltration point.
Why does this work? The password is removed from the reply, but it still decides which rows match. If the guess equals the stored password, the row matches and its identifier comes back. If not, nothing matches and the list is empty. The reply never contains the secret, yet it depends entirely on the secret. That is the boolean oracle described earlier: a question the server will answer honestly, as many times as you ask.
Proof of concept
The report lays out the reproduction in numbered steps.
- Edit a monitored host as an administrator and set an IPMI password. This plants a known secret so the behaviour can be observed.
- Log in as a low-privilege user that has read permissions for the host's group. This is the account that will do the guessing, and it is deliberately not an administrator.
- Send the following POST request. The report notes that
Content-Type: application/x-www-form-urlencodedis enforced in order to bypass the JSON parameter validations. Otherwise, the response will always be empty.
POST /zabbix/jsrpc.php?type=11 HTTP/1.1Host: <ZABBIX_HOST>Content-Type: application/x-www-form-urlencoded Cookie: zbx_session=<LOW_PRIV_SESSION_COOKIE>method=multiselect.get&object_name=hosts&filter[ipmi_password]=<password attempt>
Line by line:
POST /zabbix/jsrpc.php?type=11 HTTP/1.1is the request line.POSTmeans "I am sending data". The path points at thejsrpc.phpendpoint, andtype=11is a parameter the endpoint expects.HTTP/1.1is the protocol version.Host: <ZABBIX_HOST>names the server being contacted. The placeholder stands for the Zabbix installation's address.Content-Type: application/x-www-form-urlencodedtells the server how the body is formatted: as ordinary form fields, the same format a web form uses. The report stresses this header because the JSON validation path behaves differently, and without it the reply is always empty.Cookie: zbx_session=<LOW_PRIV_SESSION_COOKIE>carries the session cookie of the low-privileged user, so the server treats the request as coming from that account. The placeholder stands for that user's session value.method=multiselect.get&object_name=hosts&filter[ipmi_password]=<password attempt>is the body. It callsmultiselect.getonhostsand puts the guessed password intofilter[ipmi_password]. The placeholder is replaced with each guess in turn.
- The response behaves as a true/false indicator.
True response example:
{"jsonrpc":"2.0","result":[{"name":"Zabbix server","id":"10084"}]}
False response example:
{"jsonrpc":"2.0","result":[]}
Reading the true response: jsonrpc and 2.0 identify the reply format, and result is a list containing one entry, a host named Zabbix server with identifier 10084. The list is not empty, so the guess matched. Reading the false response: result is [], an empty list, so nothing matched and the guess was wrong. The password itself appears in neither reply.
By repeating the request with different values in filter[ipmi_password], the low-privileged user can test candidate passwords without ever seeing the stored value in a response. Enumerating here means trying possibilities systematically, using each true/false answer to narrow down the next guess, the way you might find a combination lock's code one digit at a time by watching which positions click.
Root cause
The dbFilter() function treats the schema array as the only gate: if the column exists in the schema for the requested table, it is accepted into the WHERE clause. The WHERE clause is the part of an SQL query that says which rows to keep, so anything placed there directly controls which records come back. There is no check that the requesting user is allowed to filter on that particular column. The query is built safely, with the input escaped, so SQL injection defences hold; the missing piece is authorisation at the column level.
The response filtering (unsetExtraFields) removes sensitive fields from the JSON output, which prevents direct disclosure, but it does not prevent the value from influencing which rows match. That difference between "can I read the field" and "can I ask questions about the field" is what turns the auto-complete endpoint into an oracle. A useful comparison: a receptionist who will not tell you a guest's room number, but will answer "is the guest in room 101?" for every room you name, has not kept the secret at all.
Impact
Low-privileged users can exfiltrate restricted, cleartext hardware and service passwords through enumeration. Cleartext means stored in a form that can be read directly, not hashed or encrypted. The report states that this can lead to physical infrastructure compromise and lateral movement. Lateral movement means using one foothold to reach further systems, and physical infrastructure compromise means the impact can extend beyond software to the actual machines, since IPMI is a management channel for hardware.
The issue affects all hidden credential fields that exist as database table objects in schema.inc.php, not only ipmi_password. The report gives CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H = 8.5. CVSS is a standard scoring system for the severity of a vulnerability; the string is a set of measurements (for example whether the attack works over a network, whether the attacker needs an account, and how much confidentiality, integrity and availability are affected), and 8.5 is the resulting score, in the high range.
An exploit repository is published at https://github.com/dennywise/IPMEye.
Fix
The report does not describe a patch or a code change. Based on the root cause, the fix would be to enforce column-level authorisation in dbFilter() (or before it), so that a filter on a sensitive column such as ipmi_password or tls_psk is rejected for users who are not authorised to query it, rather than relying on response filtering to hide the value. In everyday terms: check who is allowed to ask about a field, not just who is allowed to see it in the answer.
Variants to test
Glossary
- API: a structured way for one program to talk to another, like a service counter with defined forms.
- Auto-complete: a feature that suggests matches as you type in a field.
- Boolean: a value that is either true or false.
- Boolean oracle: a feature that answers true or false about a secret, letting you learn the secret by asking repeatedly.
- Broken Access Control (BAC): a bug where the software does what it is asked but fails to check whether the requester is allowed to ask.
- Cleartext: stored or transmitted in a directly readable form, not hashed or encrypted.
- Column: a field in a database table, such as
ipmi_password. - Cookie: a small piece of text a browser stores and sends back to a site, used to remember who you are.
- CVSS: a standard scoring system for vulnerability severity; the string lists measurements and the number is the resulting score.
- Database: organised storage for an application's data, arranged in tables of rows and columns.
- Endpoint: one specific address on a server that accepts a particular kind of request, such as
jsrpc.php. - Enumerate: to try possibilities systematically, using each answer to narrow the next guess.
- Escaping: making user input harmless before it is used in a query, so it cannot change the query's meaning.
- Filter array: a set of conditions in a request, written like
filter[name]=value, that says which rows to match. - IPMI: a management channel built into many servers, with its own credentials, used to control hardware.
- JSON: a text format for structured data, easy for programs to read.
- jsrpc.php: the Zabbix endpoint that the web interface's widgets call for lookups such as
multiselect.get. - Lateral movement: using one foothold to reach further systems.
- multiselect.get: the Zabbix method used by dropdowns and auto-complete fields to fetch matching records.
- POST: an HTTP request method meaning "I am sending data".
- Schema: a description of a database's shape: its tables, columns and data types.
- Session cookie: the cookie that identifies your logged-in session; whoever holds it is treated as you.
- SQL: the language used to ask a database questions.
- SQL injection: a bug where user input is pasted into an SQL query so carelessly that the user can change the query's meaning.
- Table: a collection of records in a database, like a spreadsheet.
- unsetExtraFields: the Zabbix routine that removes sensitive fields from the JSON reply.
- WHERE clause: the part of an SQL query that decides which rows are kept.
- Zabbix: a monitoring platform used to watch computers and network equipment.