Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀
🦀 crates.io
Not in CISA KEV
MEDIUM severity

CVE-2022-46149 — capnp

MEDIUMFix: capnproto/capnproto@25d34c6

CVE-2022-46149 is a medium-severity (CVSS 5.4) Out-of-bounds Read vulnerability in capnp. A fix is available for capnp — see the affected versions and patch details below.

Cap'n Proto vulnerable to out-of-bounds read due to logic error handling list-of-list.

Also known asGHSA-qqff-4vw4-f6hxRUSTSEC-2022-0068
Published
Nov 30, 2022
Updated
Aug 12, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Sep 19, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2022-46149.

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs58th percentile — riskier than 58% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2022-46149 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 378,156 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

3 pkgs affected
🦀capnp🦀capnp🦀capnp

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

The Cap'n Proto library and capnp Rust package are vulnerable to out-of-bounds read due to logic error handling list-of-list. If a message consumer expects data of type "list of pointers", and if the consumer performs certain specific actions on such data, then a message producer can cause the consumer to read out-of-bounds memory. This could trigger a process crash in the consumer, or in some cases could allow exfiltration of private in-memory data.

Impact

  • Remotely segfault a peer by sending it a malicious message, if the victim performs certain actions on a list-of-pointer type.
  • Possible exfiltration of memory, if the victim performs additional certain actions on a list-of-pointer type.
  • To be vulnerable, an application must perform a specific sequence of actions, described below. At present, we are not aware of any vulnerable application, but we advise updating regardless.

Fixed in

Unfortunately, the bug is present in inlined code, therefore the fix will require rebuilding dependent applications.

C++ fix:

Rust fix:

  • capnp crate version 0.15.2, 0.14.11, or 0.13.7

Details

A specially-crafted pointer could escape bounds checking by exploiting inconsistent handling of pointers when a list-of-structs is downgraded to a list-of-pointers.

For an in-depth explanation of how this bug works, see David Renshaw's blog post. This details below focus only on determining whether an application is vulnerable.

In order to be vulnerable, an application must have certain properties.

First, the application must accept messages with a schema in which a field has list-of-pointer type. This includes List(Text), List(Data), List(List(T)), or List(C) where C is an interface type. In the following discussion, we will assume this field is named foo.

Second, the application must accept a message of this schema from a malicious source, where the attacker can maliciously encode the pointer representing the field foo.

Third, the application must call getFoo() to obtain a List<T>::Reader for the field, and then use it in one of the following two ways:

  1. Pass it as the parameter to another message's setFoo(), thus copying the field into a new message. Note that copying the parent struct as a whole will not trigger the bug; the bug only occurs if the specific field foo is get/set on its own.

  2. Convert it into AnyList::Reader, and then attempt to access it through that. This is much less likely; very few apps use the AnyList API.

The dynamic API equivalents of these actions (capnp/dynamic.h) are also affected.

If the application does these steps, the attacker may be able to cause the Cap'n Proto implementation to read beyond the end of the message. This could induce a segmentation fault. Or, worse, data that happened to be in memory immediately after the message might be returned as if it were part of the message. In the latter case, if the application then forwards that data back to the attacker or sends it to another third party, this could result in exfiltration of secrets.

Any exfiltration of data would have the following limitations:

  • The attacker could exfiltrate no more than 512 KiB of memory immediately following the message buffer.
    • The attacker chooses in advance how far past the end of the message to read.
    • The attacker's message itself must be larger than the exfiltrated data. Note that a sufficiently large message buffer will likely be allocated using mmap() in which case the attack will likely segfault.
  • The attack can only work if the 8 bytes immediately following the exfiltrated data contains a valid in-bounds Cap'n Proto pointer. The easiest way to achieve this is if the pointer is null, i.e. 8 bytes of zero.
    • The attacker must specify exactly how much data to exfiltrate, so must guess exactly where such a valid pointer will exist.
    • If the exfiltrated data is not followed by a valid pointer, the attack will throw an exception. If an application has chosen to ignore exceptions (e.g. by compiling with -fno-exceptions and not registering an alternative exception callback) then the attack may be able to proceed anyway.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iocapnp≥ 0.15.0&&< 0.15.20.15.2cargo update -p capnp --precise 0.15.2
🦀crates.iocapnp≥ 0.14.0&&< 0.14.110.14.11cargo update -p capnp --precise 0.14.11
🦀crates.iocapnpall versions0.13.7cargo update -p capnp --precise 0.13.7

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for capnp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update capnp to 0.15.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-46149 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2022-46149 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2022-46149. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
Red Hat OpenShift Container Platform 4.12conmon-rs-0:0.5.1-3.rhaos4.12.git.el8RHSA-2023:1408

Frequently Asked Questions

The Cap'n Proto library and capnp Rust package are vulnerable to out-of-bounds read due to logic error handling list-of-list. If a message consumer expects data of type "list of pointers", and if the consumer performs certain specific actions on such data, then a message producer can cause the consumer to read out-of-bounds memory. This could trigger a process crash in the consumer, or in some cases could allow exfiltration of private in-memory data. Impact ====== - Remotely segfault a peer by sending it a malicious message, if the victim performs certain actions on a list-of-pointer type. -
O3 Security · Impact-Aware SCA

Is CVE-2022-46149 in your dependencies?

O3 Security finds CVE-2022-46149 across crates.io dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2022-46149: capnp (Medium 5.4) | O3 Security