GHSA-QJV8-PW8G-JW65
Unescaped User-Controlled where Array Keys in HTML Form Attributes (Potential HTML Attribute Injection)
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-QJV8-PW8G-JW65 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
I identified a potential HTML attribute injection vulnerability in Adminer's table filtering interface.
When a specially crafted HTTP GET parameter name is supplied through the where array, user-controlled characters, including single quotes and whitespace, are reflected into generated HTML form attributes without consistent HTML attribute encoding.
This behavior was observed in the generated <select> and <input> elements.
The finding may potentially lead to reflected Cross-Site Scripting (XSS), but JavaScript execution has not yet been confirmed.
Details
During security testing of Adminer, I identified an improper output encoding issue in the table filtering interface.
The application accepts user-controlled HTTP GET parameter names within the `where` array and reflects these parameter names into generated HTML form attributes.
By modifying an array key to include a single quote and additional characters, the resulting HTML contains the supplied characters inside the `name` attributes of generated `<select>` and `<input>` elements.
For example, the following parameter key:
`where[0'XSS TEST][col]`
is reflected in the generated HTML as:
<select name='where[0'XSS TEST][col]' ...>
The single quote is not consistently HTML-encoded. In another generated attribute, the same character appears encoded as `'`, indicating inconsistent output encoding.
This suggests that user-controlled array keys are not consistently escaped before being inserted into HTML attribute values.
The potentially affected code path is the rendering of the table filter form, particularly the generation of the `name` attributes for the filter column, operator, and value controls.
The relevant source code should be investigated in the table filtering form rendering logic, including the handling of `where` array keys and the HTML attribute generation functions.
I have confirmed the reflection and HTML structure modification. However, JavaScript execution has not yet been independently verified, so the XSS impact remains subject to further validation.
Proof of concept
Environment
- Product: Adminer
- Installation: Localhost
- Database: MySQL / MariaDB
- Database name: `wobble`
- Table: `users`
- Tested parameter: `where`
- Browser: Firefox
Steps to reproduce
- Install and run Adminer in a local test environment.
- Log in to the database.
- Open the `users` table in the `wobble` database.
- Intercept or manually modify the HTTP GET request used by the table filtering interface.
- Change a normal numeric filter array key to include a single quote and additional text:
`where[0'XSS TEST][col]`
- Submit the modified request.
- Inspect the generated HTML response using browser Developer Tools or the Network response viewer.
Observed result
The application generates HTML containing the supplied characters in the form field names:
<select name='where[0'XSS TEST][col]' ...>
<select name='where[0'XSS TEST][op]' ...>
<input type='search'
name='where[0'XSS TEST][val]'
value='5'>
The output demonstrates inconsistent encoding of user-controlled parameter names in HTML attributes.
Expected result
All user-controlled parameter names should be safely encoded before being inserted into HTML attributes.
Reproducibility
The behavior was observed in a local Adminer installation. The exact Adminer version and PHP version should be recorded before submission.
JavaScript execution has not yet been confirmed.
Impact
The issue demonstrates improper output encoding of user-controlled HTTP parameter names in HTML attribute contexts.
The confirmed impact is potential HTML attribute injection in the table filtering interface.
If an attacker can control the parameter name and successfully inject executable HTML attributes, this could potentially lead to reflected Cross-Site Scripting (XSS).
In a successful XSS scenario, an attacker may be able to execute JavaScript in the context of an authenticated Adminer session.
Potential consequences could include unauthorized actions performed through the victim's browser and exposure of information accessible to that session.
Who is affected?
Users who access an Adminer installation where the affected table filtering functionality is exposed and where the crafted request can reach the vulnerable rendering code.
Security classification
- Potential vulnerability: Reflected HTML Attribute Injection
- Potential CWE: CWE-79 (Improper Neutralization of Input During Web Page Generation)
- XSS: Not yet independently confirmed
The actual security severity depends on whether executable attribute injection can be demonstrated and on the authentication and deployment context.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Versiones afectadas
6.3.0Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistvrana/adminer |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/vrana/adminer/security/advisories/GHSA-qjv8-pw8g-jw65Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
