# CVE-2023-21406: Heap-based buffer overflow in Axis A1001 Network Door Controller's OSDP communication

> Heap-based buffer overflow in AXIS A1001 allows arbitrary code execution via malicious OSDP messages.

- **Severity:** High 7.1 (`CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 25 Jul 2023
- **Updated:** 8 Nov 2024
- **Also known as:** GHSA-m2fp-c5wr-xjph

## What is CVE-2023-21406?

CVE-2023-21406 is a high-severity memory corruption vulnerability in AXIS A1001 Network Door Controller, published on 25 Jul 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Ariel Harush and Roy Hodir from OTORIO have found a flaw in the AXIS A1001 when
communicating over OSDP. A heap-based buffer overflow was found in the pacsiod process which
is handling the OSDP communication allowing to write outside of the allocated buffer. By
appending invalid data to an OSDP message it was possible to write data beyond the heap
allocated buffer. The data written outside the buffer could be used to execute arbitrary code. 

lease refer to the Axis security advisory for more information, mitigation and affected products and software versions.

Weakness: CWE-787 (Out-of-bounds Write), CWE-120 (Buffer Copy without Checking Size of Input), CWE-122 (Heap-based Buffer Overflow)

## Which versions are affected by CVE-2023-21406?

It affects 1 product.


Products: Axis A1001 Firmware.

## How do I fix CVE-2023-21406?

No fix has been published for CVE-2023-21406 yet. Limit exposure of the affected software until one is available.

## Is CVE-2023-21406 being exploited?

There is no known exploitation of CVE-2023-21406 in the wild and no public exploit code.

## Other vulnerabilities in AXIS A1001 Network Door Controller

- [CVE-2018-10660](https://insights.sbomify.com/CVE-2018-10660/): Command injection in n/a (critical 9.8)
- [CVE-2018-10661](https://insights.sbomify.com/CVE-2018-10661/): Auth bypass in n/a (critical 9.8)
- [CVE-2018-10662](https://insights.sbomify.com/CVE-2018-10662/): Information disclosure in n/a (critical 9.8)
- [CVE-2018-10658](https://insights.sbomify.com/CVE-2018-10658/): Memory corruption in n/a (high 7.5)
- [CVE-2018-10659](https://insights.sbomify.com/CVE-2018-10659/): Memory corruption in n/a (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-21406 and fix it if it is affected.

What it is: CVE-2023-21406 is a high-severity memory corruption vulnerability in AXIS A1001 Network Door Controller, published on 25 Jul 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-21406 in the wild and no public exploit code.

Affected product: AXIS A1001 Network Door Controller. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-21406/ (Markdown: https://insights.sbomify.com/CVE-2023-21406/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-21406
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-21406
- OSV: https://osv.dev/vulnerability/CVE-2023-21406

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-21406/
Summaries are generated and may contain mistakes; the official description above is the record.
