Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

aiohikvision

Latest version: v0.1.1

Overview

Last scanned
26 Nov 2026
Published
26 Nov 2026
PyPI package Publisher: webysther
0 Stars
0 Forks
2 Versions
Python Repo language

Scan summary

aiohikvision was last scanned on 26 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 26 Nov 2026.
  • Findings: No rules fired in version 0.1.1.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 26 Nov 2026 No rules fired
0.1.0 26 Nov 2026 No rules fired

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

aiohikvision

Asyncio library for Hikvision devices: ISAPI (cameras, recorders, door stations) and the SIP calls of video door stations. It is fully typed and has no Home Assistant dependency; its main user is Hikvision Virtual Indoor Station, which makes Home Assistant the indoor station of a door station.

pip install aiohikvision

Python 3.13 or newer.

A door station, over ISAPI

DoorStation is what a door station does for its indoor station, on one authenticated link: what it is, its doors, its picture, and its speaker.

import asyncio
import os

import aiohttp

from aiohikvision import DoorStation


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        door = DoorStation(
            session,
            os.environ["DOOR_HOST"],
            os.environ["DOOR_USERNAME"],
            os.environ["DOOR_PASSWORD"],
            port=int(os.environ.get("DOOR_PORT", "80")),
        )
        info = await door.read_info()
        print(info.identity.model, info.identity.firmware)
        print("Doors:", info.doors, "Speaker:", info.talk)
        # await door.open_door(1)  # opens the lock of door 1


asyncio.run(main())

It also takes a snapshot (snapshot()), gives the RTSP address of the stream with its sound (rtsp_url()), checks that the device answers (check()), and plays G.711 through the speaker outside a call (talk(), a TwoWayAudio: one talk at a time, a new one takes the speaker over).

Its calls, over SIP

The door station calls over SIP; its picture and sound are read over RTSP. The library is the SIP server of the door's VoIP line and the callee of its calls (why):

import asyncio
import os

from aiohikvision import CallServer, CallState, DoorCall, DoorRegistrar, DoorTransport


async def main() -> None:
    door_ip = os.environ["DOOR_IP"]  # the address its SIP packets come from
    port = int(os.environ.get("SIP_PORT", "5060"))
    transport = DoorTransport(local_addr=("0.0.0.0", port), allowed_hosts={door_ip})
    tasks: set[asyncio.Task[object]] = set()

    def changed(call: DoorCall) -> None:
        print(call.state.value, call.callee, call.end_reason)
        if call.state is CallState.RINGING:
            # Refuse it: the door shows "busy". calls.answer(call.id) would answer
            task = asyncio.get_running_loop().create_task(calls.reject(call.id))
            tasks.add(task)
            task.add_done_callback(tasks.discard)

    calls = CallServer(
        transport,
        advertise=os.environ["MY_IP"],  # this machine's address, as the door reaches it
        on_change=changed,
        registrar=DoorRegistrar(),
    )
    await calls.start()
    try:
        await asyncio.sleep(float(os.environ.get("SECONDS", "600")))
    finally:
        await calls.stop()


asyncio.run(main())
  • DoorTransport: UDP SIP that only hears the configured door stations, and drops their jaK keepalives quietly (on_keepalive tells they are alive).
  • DoorRegistrar: accepts the REGISTER of the door's VoIP line, grants a shorter registration than it asks, and says when it registers and expires.
  • CallServer / DoorCall: a call rings with 180 at once, then is answered, refused or hung up on command; every command names its call. Two answers at once give the call to the first. The answer is G.711 at a=ptime:40, a=sendonly, m=video 0.
  • Talkback: the microphone to the door during a call: call.push(frame) takes 20 ms G.711 frames, and they leave as 40 ms RTP packets on an absolute clock, in bursts. The door slows its own audio when it receives 20 ms packets.
  • aiohikvision.media.g711: reference µ-law and A-law encoders, identical to audioop on every sample, tones and 20 ms frames.
From a terminal

scripts/door_server.py runs the library as the server of a real door station, with port 5060 free and the door's VoIP line pointing at this machine:

# Ring until the door gives up: the visitor hears the ringback
uv run python scripts/door_server.py --advertise <ha-ip> --door <door-ip> facade
# Answer after 5 s, talk in 1 kHz bursts (2 s on, 2 s off), hang up after 30 s
uv run python scripts/door_server.py --advertise <ha-ip> --door <door-ip> hybrid --answer-after 5

What the door station does

Measured on a DS-KD8003-IME1(B) with firmware V3.7.1 and V3.7.3: docs/DEVICE_FINDINGS.md. In short: point its VoIP line at your server, set its SIP audio to G.711 only (its Opus is non-standard), and expect it to cancel after its ring time (60 s) and hang up at its talk time (90 s by default).

Development

uv sync
uv run pytest --cov
uv run mypy
uv run ruff check . && uv run ruff format --check .

The tests never reach a device: they run against doubles of the measured ones (tests/fakes), with anonymized answers. scripts/sip_probe.py is the measuring tool of the findings; its captures stay out of the repository.

License

Apache License 2.0. The ISAPI subpackage comes from Hikvision Bridge, by yannik2480, under the same license: see NOTICE. Hikvision is a trademark of its owner; this project is not affiliated with it.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases aiohikvision

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229