Unauthenticated Command Injection
Cacti is an open source platform which provides a robust and extensible operational monitoring and fault management framework for users. In affected versions a command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti, if a specific data source was selected for any monitored device. The vulnerability resides in the `remote_agent.php` file. This file can be accessed without authentication. This function retrieves the IP address of the client via `get_client_addr` and resolves this IP address to the corresponding hostname via `gethostbyaddr`. After this, it is verified that an entry within the `poller` table exists, where the hostname corresponds to the resolved hostname. If such an entry was found, the function returns `true` and the client is authorized. This authorization can be bypassed due to the implementation of the `get_client_addr` function. The function is defined in the file `lib/functions.php` and checks serval `$_SERVER` variables to determine the IP address of the client. The variables beginning with `HTTP_` can be arbitrarily set by an attacker. Since there is a default entry in the `poller` table with the hostname of the server running Cacti, an attacker can bypass the authentication e.g. by providing the header `Forwarded-For: `. This way the function `get_client_addr` returns the IP address of the server running Cacti. The following call to `gethostbyaddr` will resolve this IP address to the hostname of
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-46169
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 08:37 UTC · Revision 1
Source evidence
Cacti is an open source platform which provides a robust and extensible operational monitoring and fault management framework for users. In affected versions a command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti, if a specific data source was selected for any monitored device. The vulnerability resides in the `remote_agent.php` file. This file can be accessed without authentication. This function retrieves the IP address of the client via `get_client_addr` and resolves this IP address to the corresponding hostname via `gethostbyaddr`. After this, it is verified that an entry within the `poller` table exists, where the hostname corresponds to the resolved hostname. If such an entry was found, the function returns `true` and the client is authorized. This authorization can be bypassed due to the implementation of the `get_client_addr` function. The function is defined in the file `lib/functions.php` and checks serval `$_SERVER` variables to determine the IP address of the client. The variables beginning with `HTTP_` can be arbitrarily set by an attacker. Since there is a default entry in the `poller` table with the hostname of the server running Cacti, an attacker can bypass the authentication e.g. by providing the header `Forwarded-For: `. This way the function `get_client_addr` returns the IP address of the server running Cacti. The following call to `gethostbyaddr` will resolve this IP address to the hostname of
osv:CVE-2022-46169
Complete source record
{
"id": "9e8a195b27ee5d0129399e48d6c1ec05b700451f308e23678351b536feb8de11",
"url": "https://osv.dev/vulnerability/CVE-2022-46169",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Unauthenticated Command Injection",
"summary": "Cacti is an open source platform which provides a robust and extensible operational monitoring and fault management framework for users. In affected versions a command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti, if a specific data source was selected for any monitored device. The vulnerability resides in the `remote_agent.php` file. This file can be accessed without authentication. This function retrieves the IP address of the client via `get_client_addr` and resolves this IP address to the corresponding hostname via `gethostbyaddr`. After this, it is verified that an entry within the `poller` table exists, where the hostname corresponds to the resolved hostname. If such an entry was found, the function returns `true` and the client is authorized. This authorization can be bypassed due to the implementation of the `get_client_addr` function. The function is defined in the file `lib/functions.php` and checks serval `$_SERVER` variables to determine the IP address of the client. The variables beginning with `HTTP_` can be arbitrarily set by an attacker. Since there is a default entry in the `poller` table with the hostname of the server running Cacti, an attacker can bypass the authentication e.g. by providing the header `Forwarded-For: `. This way the function `get_client_addr` returns the IP address of the server running Cacti. The following call to `gethostbyaddr` will resolve this IP address to the hostname of ",
"evidence": "osv:CVE-2022-46169",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2022-46169",
"aliases": [
"CVE-2022-46169",
"GHSA-6p93-p743-35gf"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/cacti/cacti",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "aa48e25d81fef743021f50f9254ebbbd626a416c"
},
{
"fixed": "7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216"
},
{
"fixed": "a8d59e8fa5f0054aa9c6981b1cbe30ef0e2a0ec9"
},
{
"fixed": "b43f13ae7f1e6bfe4e8e56a80a7cd867cf2db52b"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:cacti:cacti:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.2.23"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "a8d59e8fa5f0054aa9c6981b1cbe30ef0e2a0ec9"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "b43f13ae7f1e6bfe4e8e56a80a7cd867cf2db52b"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"release/1.2.22",
"release/1.2.21",
"release/1.2.20",
"release/1.2.19",
"releaes/1.2.19",
"release/1.2.18",
"release/1.2.17",
"rel-1.2.17",
"release/1.2.16",
"release/1.2.15",
"release/1.2.14",
"release/1.2.13",
"release/1.2.12",
"release/1.2.11",
"release/1.2.10",
"release/1.2.9",
"release/1.2.8",
"release/1.2.7",
"release/1.2.6",
"release/1.2.5",
"release/1.2.4",
"release/1.2.3",
"release/1.2.2",
"release/1.2.1",
"release/1.2.0",
"release/1.1.38",
"release/1.1.37",
"release/1.1.36",
"release/1.1.35",
"release/1.1.34",
"release/1.1.33",
"release/1.1.32",
"release/1.1.31",
"release/1.1.30",
"release/1.1.29",
"release/1.1.28",
"release/1.1.27",
"release/1.1.26",
"release/1.1.25",
"release/1.1.24",
"release/1.1.23",
"release/1.1.22",
"release/1.1.21",
"release/1.1.20",
"release/1.1.19",
"release/1.1.18",
"release/1.1.17",
"release/1.1.16",
"release/1.1.15",
"release/1.1.14",
"release/1.1.13",
"release/1.1.12",
"release/1.1.11",
"release/1.1.8",
"release/1.1.7",
"release/1.1.6",
"release/1.1.5",
"release/1.1.4",
"release/1.1.3",
"release/1.1.2",
"release/1.1.1",
"release/1.1.0",
"release/1.0.6",
"release/1.0.5",
"release/1.0.4",
"release/1.0.3",
"release/1.0.2",
"release/1.0.1",
"release/1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-46169.json"
}
}
],
"modified": "2026-10-28T02:30:50.416338673Z",
"provider": "osv",
"references": [
"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-46169",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/46xxx/CVE-2022-46169.json",
"https://github.com/Cacti/cacti/security/advisories/GHSA-6p93-p743-35gf",
"https://nvd.nist.gov/vuln/detail/CVE-2022-46169",
"https://github.com/Cacti/cacti/commit/7f0e16312dd5ce20f93744ef8b9c3b0f1ece2216",
"https://github.com/Cacti/cacti/commit/a8d59e8fa5f0054aa9c6981b1cbe30ef0e2a0ec9",
"https://github.com/Cacti/cacti/commit/b43f13ae7f1e6bfe4e8e56a80a7cd867cf2db52b"
],
"provider_metadata": {
"cwe_ids": [
"CWE-74"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/46xxx/CVE-2022-46169.json"
}
},
"related_cves": [
{
"value": "CVE-2022-46169",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 518779,
"published_at": "2022-12-05T20:48:07.852+00:00"
}