GHSA-52HF-63Q4-R926
Vulnerability from github – Published: 2026-04-14 22:49 – Updated: 2026-04-14 22:49Summary
The 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.
Details
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:
// git.json.php — complete file
<?php
header('Content-Type: application/json');
$cmd = "git log -1";
exec($cmd . " 2>&1", $output, $return_val);
$obj = new stdClass();
$obj->output = $output;
foreach ($output as $value) {
preg_match("/Date:(.*)/i", $value, $match);
if (!empty($match[1])) {
$obj->date = strtotime($match[1]);
$obj->dateString = trim($match[1]);
$obj->dateMySQL = date("Y-m-d H:i:s", $obj->date);
}
}
echo json_encode($obj);
The 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.
The exposed data enables: 1. 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. 2. 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. 3. Commit message intelligence: Commit messages may reference internal bug trackers, security fixes in progress, or infrastructure details.
PoC
# Single unauthenticated request — no cookies, no headers needed
curl -s https://target.example/git.json.php | python3 -m json.tool
Verified response from test instance:
{
"output": [
"commit 80a8af96e861cff45cd80fdd2478d00b2c07749e",
"Author: Daniel Neto <me@danielneto.com>",
"Date: Wed Apr 8 16:07:23 2026 -0300",
"",
" fix: Update payment response handling to include transaction token and URL"
],
"date": 1775675243,
"dateString": "Wed Apr 8 16:07:23 2026 -0300",
"dateMySQL": "2026-04-08 19:07:23"
}
Impact
- 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.
- Developer email addresses are leaked, enabling targeted phishing or social engineering against project maintainers and contributors.
- Commit messages may disclose internal project details, security fix status, or infrastructure information.
Recommended Fix
Delete git.json.php entirely — it serves no user-facing purpose and exists only as a development/debug artifact:
rm git.json.php
If version display is needed for administrators, gate it behind authentication:
<?php
require_once 'videos/configuration.php';
if (!User::isAdmin()) {
header('HTTP/1.1 403 Forbidden');
die(json_encode(['error' => 'Forbidden']));
}
header('Content-Type: application/json');
$cmd = "git log -1";
exec($cmd . " 2>&1", $output, $return_val);
$obj = new stdClass();
$obj->output = $output;
foreach ($output as $value) {
preg_match("/Date:(.*)/i", $value, $match);
if (!empty($match[1])) {
$obj->date = strtotime($match[1]);
$obj->dateString = trim($match[1]);
$obj->dateMySQL = date("Y-m-d H:i:s", $obj->date);
}
}
echo json_encode($obj);
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "wwbn/avideo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "29.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-14T22:49:25Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"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 \u2014 complete file\n\u003c?php\nheader(\u0027Content-Type: application/json\u0027);\n$cmd = \"git log -1\";\nexec($cmd . \" 2\u003e\u00261\", $output, $return_val);\n\n$obj = new stdClass();\n$obj-\u003eoutput = $output;\n\nforeach ($output as $value) {\n preg_match(\"/Date:(.*)/i\", $value, $match);\n if (!empty($match[1])) {\n $obj-\u003edate = strtotime($match[1]);\n $obj-\u003edateString = trim($match[1]);\n $obj-\u003edateMySQL = date(\"Y-m-d H:i:s\", $obj-\u003edate);\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\u0027s 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 \u2014 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 \u003cme@danielneto.com\u003e\",\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 \u2014 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\u003c?php\nrequire_once \u0027videos/configuration.php\u0027;\nif (!User::isAdmin()) {\n header(\u0027HTTP/1.1 403 Forbidden\u0027);\n die(json_encode([\u0027error\u0027 =\u003e \u0027Forbidden\u0027]));\n}\nheader(\u0027Content-Type: application/json\u0027);\n$cmd = \"git log -1\";\nexec($cmd . \" 2\u003e\u00261\", $output, $return_val);\n\n$obj = new stdClass();\n$obj-\u003eoutput = $output;\n\nforeach ($output as $value) {\n preg_match(\"/Date:(.*)/i\", $value, $match);\n if (!empty($match[1])) {\n $obj-\u003edate = strtotime($match[1]);\n $obj-\u003edateString = trim($match[1]);\n $obj-\u003edateMySQL = date(\"Y-m-d H:i:s\", $obj-\u003edate);\n }\n}\n\necho json_encode($obj);\n```",
"id": "GHSA-52hf-63q4-r926",
"modified": "2026-04-14T22:49:25Z",
"published": "2026-04-14T22:49:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-52hf-63q4-r926"
},
{
"type": "PACKAGE",
"url": "https://github.com/WWBN/AVideo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "WWBN AVideo has an Unauthenticated Information Disclosure via git.json.php Exposes Developer Emails and Deployed Version"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.