{"id":"CVE-2026-40908","aliases":["GHSA-52hf-63q4-r926"],"url":"https://o3.security/vulnerability/CVE-2026-40908","summary":"WWBN AVideo has an Unauthenticated Information Disclosure via git.json.php that Exposes Developer Emails and Deployed Version","details":"## Summary\n\nThe file `git.json.php` at the web root executes `git log -1` and returns the full output as JSON to any unauthenticated user. This exposes the exact deployed commit hash (enabling version fingerprinting against known CVEs), developer names and email addresses (PII), and commit messages which may contain references to internal systems or security fixes.\n\n## Details\n\n`git.json.php` is a standalone PHP script with no authentication, no session validation, and no framework bootstrap. It directly executes a shell command and returns the result:\n\n```php\n// git.json.php — complete file\n<?php\nheader('Content-Type: application/json');\n$cmd = \"git log -1\";\nexec($cmd . \"  2>&1\", $output, $return_val);\n\n$obj = new stdClass();\n$obj->output = $output;\n\nforeach ($output as $value) {\n    preg_match(\"/Date:(.*)/i\", $value, $match);\n    if (!empty($match[1])) {\n        $obj->date = strtotime($match[1]);\n        $obj->dateString = trim($match[1]);\n        $obj->dateMySQL = date(\"Y-m-d H:i:s\", $obj->date);\n    }\n}\n\necho json_encode($obj);\n```\n\nThe file does not `require` any configuration or authentication module. It is not protected by `.htaccess` rules. The endpoint is directly accessible to any network client.\n\nThe exposed data enables:\n1. **Version fingerprinting**: The commit hash identifies the exact deployed version, allowing attackers to cross-reference the project's public git history against known CVEs (AVideo has 22 published GHSAs) to determine which vulnerabilities remain unpatched on a given instance.\n2. **Developer PII leakage**: Author name and email from the git commit are exposed. On self-hosted instances, this may reveal internal/corporate email addresses not otherwise publicly available.\n3. **Commit message intelligence**: Commit messages may reference internal bug trackers, security fixes in progress, or infrastructure details.\n\n## PoC\n\n```bash\n# Single unauthenticated request — no cookies, no headers needed\ncurl -s https://target.example/git.json.php | python3 -m json.tool\n```\n\nVerified response from test instance:\n```json\n{\n    \"output\": [\n        \"commit 80a8af96e861cff45cd80fdd2478d00b2c07749e\",\n        \"Author: Daniel Neto <me@danielneto.com>\",\n        \"Date:   Wed Apr 8 16:07:23 2026 -0300\",\n        \"\",\n        \"    fix: Update payment response handling to include transaction token and URL\"\n    ],\n    \"date\": 1775675243,\n    \"dateString\": \"Wed Apr 8 16:07:23 2026 -0300\",\n    \"dateMySQL\": \"2026-04-08 19:07:23\"\n}\n```\n\n## Impact\n\n- Any unauthenticated remote attacker can determine the exact deployed version and identify which known CVEs (22 published GHSAs for AVideo) apply to the target instance.\n- Developer email addresses are leaked, enabling targeted phishing or social engineering against project maintainers and contributors.\n- Commit messages may disclose internal project details, security fix status, or infrastructure information.\n\n## Recommended Fix\n\nDelete `git.json.php` entirely — it serves no user-facing purpose and exists only as a development/debug artifact:\n\n```bash\nrm git.json.php\n```\n\nIf version display is needed for administrators, gate it behind authentication:\n\n```php\n<?php\nrequire_once 'videos/configuration.php';\nif (!User::isAdmin()) {\n    header('HTTP/1.1 403 Forbidden');\n    die(json_encode(['error' => 'Forbidden']));\n}\nheader('Content-Type: application/json');\n$cmd = \"git log -1\";\nexec($cmd . \"  2>&1\", $output, $return_val);\n\n$obj = new stdClass();\n$obj->output = $output;\n\nforeach ($output as $value) {\n    preg_match(\"/Date:(.*)/i\", $value, $match);\n    if (!empty($match[1])) {\n        $obj->date = strtotime($match[1]);\n        $obj->dateString = trim($match[1]);\n        $obj->dateMySQL = date(\"Y-m-d H:i:s\", $obj->date);\n    }\n}\n\necho json_encode($obj);\n```","published":"2026-04-21T19:52:34.204Z","modified":"2026-08-12T03:51:29.075568088Z","cvss":{"score":5.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"},"epss":{"score":0.0025,"percentile":0.16472,"asOf":"2026-08-12"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"wwbn/avideo","fixedVersion":null}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40908.json"},{"type":"ADVISORY","url":"https://github.com/WWBN/AVideo/security/advisories/GHSA-52hf-63q4-r926"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40908"},{"type":"PACKAGE","url":"https://github.com/WWBN/AVideo"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:29.075568088Z"}}