{"id":"CVE-2026-34381","aliases":["CVE-2026-34381","GHSA-7fh7-8xqm-3g88"],"related":[],"kind":"vulnerability","state":"published","title":"Admidio: Unauthenticated Access to Role-Restricted documents via neutralized .htaccess","summary":"Admidio is an open-source user management solution. From version 5.0.0 to before version 5.0.8, Admidio relies on adm_my_files/.htaccess to deny direct HTTP access to uploaded documents. The Docker image ships with AllowOverride None in the Apache configuration, which causes Apache to silently ignore all .htaccess files. As a result, any file uploaded to the documents module regardless of the role-based permissions configured in the UI, is directly accessible over HTTP without authentication by anyone who knows the file path. The file path is disclosed in the upload response JSON. This issue has been patched in version 5.0.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Admidio is an open-source user management solution. From version 5.0.0 to before version 5.0.8, Admidio relies on adm_my_files/.htaccess to deny direct HTTP access to uploaded documents. The Docker image ships with AllowOverride None in the Apache configuration, which causes Apache to silently ignore all .htaccess files. As a result, any file uploaded to the documents module regardless of the role-based permissions configured in the UI, is directly accessible over HTTP without authentication by anyone who knows the file path. The file path is disclosed in the upload response JSON. This issue has been patched in version 5.0.8.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nAdmidio relies on `adm_my_files/.htaccess` to deny direct HTTP access to uploaded documents. The Docker image ships with `AllowOverride None` in the Apache configuration, which causes Apache to silently ignore all `.htaccess` files. As a result, any file uploaded to the\ndocuments module regardless of the _role-based_ permissions configured in the UI, is directly accessible over HTTP without authentication by anyone who knows the file path. The file path is disclosed in the upload response JSON.\n\n---\n\n### Root Cause\n\n**File 1: Intended protection (ignored):**  \n`adm_my_files/.htaccess`\n```apache\nRequire all denied\n```\n<img width=\"408\" height=\"403\" alt=\"imagen\" src=\"https://github.com/user-attachments/assets/95f0d389-a1a9-4dc4-9840-7f189d2c58ff\" />\n\n**File 2: Apache config that neutralizes it:**  \n\n* Command in order to search in Docker container: `docker exec admidio-sec-app cat /etc/apache2/apache2.conf`\n\n`/etc/apache2/apache2.conf` (Docker image)\n```apache\n<Directory ${APACHE_DOCUMENT_ROOT}>\n    AllowOverride None\n</Directory>\n```\n\n<img width=\"492\" height=\"328\" alt=\"imagen\" src=\"https://github.com/user-attachments/assets/2f2e09b1-0c2e-4932-8698-a40f6b92e917\" />\n\n\n`AllowOverride None` instructs Apache to skip `.htaccess` processing entirely, the deny rule never executes. The upload directory is inside the web root at `/opt/app-root/src/adm_my_files/` and returns **HTTP 200** for direct requests.\n\n**File 3: Upload response leaks the direct URL:**  `system/file_upload.php`, upload response JSON:\n\n<img width=\"1528\" height=\"624\" alt=\"imagen\" src=\"https://github.com/user-attachments/assets/50e66fde-ff41-4efa-adc9-ceeb5b23a97d\" />\n\n```json\n{\n  \"files\": [{\n    \"name\": \"sensitive_poc.txt\",\n    \"url\": \"http://TARGET/adm_my_files/documents_research/TEST-SENSITIVE/sensitive_poc.txt\"\n  }]\n}\n```\n\n### Verified PoC\n\n**Step 1: Admin creates a restricted folder (visible only to Administrator role):**  \n> `modules/documents-files.php` → permissions set to role `Administrator` only.\n\n<img width=\"1161\" height=\"784\" alt=\"imagen\" src=\"https://github.com/user-attachments/assets/25d81e44-9a7c-4991-b72e-6e664d176695\" />\n\n**Step 2: Admin uploads a file to the restricted folder.**  \n> Upload response returns:\n```\nhttp://TARGET/adm_my_files/documents_research/TEST-SENSITIVE/sensitive_poc.txt\n```\n\n<img width=\"1239\" height=\"294\" alt=\"imagen\" src=\"https://github.com/user-attachments/assets/84c1bcd1-47d7-4115-ac0f-653b0a6d7301\" />\n\n**Step 3: Unauthenticated request retrieves the file:**\n```bash\ncurl -X GET 'http://TARGET/adm_my_files/documents_research/TEST-SENSITIVE/sensitive_poc.txt'\n# Response: full file contents — no authentication required\n```\n\n<img width=\"1051\" height=\"150\" alt=\"imagen\" src=\"https://github.com/user-attachments/assets/1ed7fab7-59cb-4d5b-8c60-12108490d1e4\" />\n\n**Step 4: Confirm folder is role-restricted:**\n```sql\nSELECT fil_name, fol_name, fol_public FROM adm_files JOIN adm_folders ON fil_fol_id = fol_id \nORDER BY fil_id DESC LIMIT 5; -- fol_public = 0, role restricted — yet file is publicly accessible\n```\n---\n\n### Impact\n\n- Any document uploaded to **Admidio** including files restricted to specific roles is publicly accessible via direct HTTP request with no authentication required\n- **Role-based** access control on the documents module is completely bypassed at the filesystem level\n- Sensitive organizational documents (contracts, member data, financial records) are exposed to anyone who can guess or construct the file path\n- The upload API response discloses the direct URL to the uploader, making path enumeration trivial\n\n### Recommended Fix\n\n**Option 1 (preferred): Enable AllowOverride in Apache config:**\n```apache\n<Directory /opt/app-root/src/adm_my_files>\n    AllowOverride All\n</Directory>\n```\n\n**Option 2: Move uploads outside the web root:**  \nStore uploaded files in a directory outside `DOCUMENT_ROOT` and serve them exclusively through Admidio's download handler (`modules/documents-files.php?mode=download`), which enforces role checks before serving the file.\n\n**Option 3: Apache-level explicit deny (does not require .htaccess):**\n```apache\n<Directory /opt/app-root/src/adm_my_files>\n    Require all denied\n</Directory>\n```\n> The most robust long-term fix is Option 2 — moving uploads outside the web root eliminates the dependency on Apache configuration correctness entirely.\n\n**Reported by:** Juan Felipe Oz [@JF0x0r](https://x.com/PwnedRar_)\n> [LinkedIn](https://www.linkedin.com/in/juanfelipeoz/)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Admidio es una solución de gestión de usuarios de código abierto. Desde la versión 5.0.0 hasta antes de la versión 5.0.8, Admidio se basa en adm_my_files/.htaccess para denegar el acceso HTTP directo a los documentos subidos. La imagen de Docker se envía con AllowOverride None en la configuración de Apache, lo que hace que Apache ignore silenciosamente todos los archivos .htaccess. Como resultado, cualquier archivo subido al módulo de documentos, independientemente de los permisos basados en roles configurados en la interfaz de usuario (UI), es directamente accesible a través de HTTP sin autenticación por cualquiera que conozca la ruta del archivo. La ruta del archivo se divulga en el JSON de respuesta de la subida. Este problema ha sido parcheado en la versión 5.0.8.","source":"nvd"}],"published":"2026-03-31T20:31:23.379Z","modified":"2026-10-06T22:10:00.247Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-284"],"affected":[{"ranges":[{"version":">= 5.0.0, < 5.0.8","status":"affected"}],"vendor":"Admidio","product":"admidio","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.0.8"}],"ecosystem":"Packagist","package":"admidio/admidio","purl":"pkg:composer/admidio/admidio","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"5.0.0","fixed":"5.0.8"}],"vendor":"admidio","product":"admidio","cpe":"cpe:2.3:a:admidio:admidio:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Admidio/admidio/security/advisories/GHSA-7fh7-8xqm-3g88","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Admidio/admidio/commit/5f770c1ca81a4f6b02136280cd63316a35aabaaf","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34381","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Admidio/admidio","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-01T13:40:59.551Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34381","url":"https://www.cve.org/CVERecord?id=CVE-2026-34381","licence":"CVE Terms of Use","modified":"2026-04-01T13:41:03.359Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7fh7-8xqm-3g88","url":"https://github.com/advisories/GHSA-7fh7-8xqm-3g88","licence":"CC-BY-4.0","modified":"2026-03-31T23:26:27.452Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34381","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34381","licence":"Public domain","modified":"2026-10-06T22:10:00.247Z"}],"updatedAt":"2026-11-25T22:59:17.628Z","epss":{"score":0.00604,"percentile":0.43067,"date":"2026-11-30T12:00:22.000Z"}}