This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate zbus

Dependencies

(37 total, 16 outdated, 2 possibly insecure)

CrateRequiredLatestStatus
 async-broadcast^0.5.00.7.2out of date
 async-executor^1.5.01.14.0up to date
 async-fs^1.6.02.2.0out of date
 async-io^1.12.02.6.0out of date
 async-lock^2.6.03.4.2out of date
 async-process^1.7.02.5.0out of date
 async-recursion^1.0.01.1.1up to date
 async-task^4.3.04.7.1up to date
 async-trait^0.1.580.1.92up to date
 byteorder^1.4.31.5.0up to date
 derivative^2.22.2.0up to date
 enumflags2^0.7.50.7.12up to date
 event-listener^2.5.35.4.2out of date
 futures-core^0.3.250.3.34up to date
 futures-sink^0.3.250.3.34up to date
 futures-util^0.3.250.3.34up to date
 hex^0.4.30.4.3up to date
 nix^0.26.00.31.3out of date
 once_cell^1.4.01.21.4up to date
 ordered-stream^0.20.2.0up to date
 quick-xml ⚠️^0.27.10.42.0out of date
 rand^0.8.50.10.2out of date
 serde^1.01.0.229up to date
 serde-xml-rs^0.4.10.8.2out of date
 serde_repr^0.1.90.1.21up to date
 sha1^0.10.50.11.0out of date
 static_assertions^1.1.01.1.0up to date
 tokio ⚠️^1.21.21.53.1maybe insecure
 tokio-vsock^0.3.30.7.2out of date
 tracing^0.1.370.1.44up to date
 uds_windows^1.0.21.2.1up to date
 vsock^0.3.00.5.4out of date
 winapi^0.30.3.9up to date
 xdg-home^1.0.01.3.0up to date
 zbus_macros=3.13.15.19.0out of date
 zbus_names^2.54.3.4out of date
 zvariant^3.10.05.15.0out of date

Dev dependencies

(8 total, 2 possibly insecure)

CrateRequiredLatestStatus
 async-std^1.12.01.13.2up to date
 doc-comment^0.3.30.3.4up to date
 futures-util^0.3.250.3.34up to date
 ntest^0.9.00.9.5up to date
 tempfile^3.3.03.27.0up to date
 test-log^0.2.110.2.21up to date
 tokio ⚠️^11.53.1maybe insecure
 tracing-subscriber ⚠️^0.3.160.3.23maybe insecure

Security Vulnerabilities

tokio: reject_remote_clients Configuration corruption

RUSTSEC-2023-0001

On Windows, configuring a named pipe server with pipe_mode will force ServerOptions::reject_remote_clients as false.

This drops any intended explicit configuration for the reject_remote_clients that may have been set as true previously.

The default setting of reject_remote_clients is normally true meaning the default is also overridden as false.

Workarounds

Ensure that pipe_mode is set first after initializing a ServerOptions. For example:

let mut opts = ServerOptions::new();
opts.pipe_mode(PipeMode::Message);
opts.reject_remote_clients(true);

tracing-subscriber: Logging user input may result in poisoning logs with ANSI escape sequences

RUSTSEC-2025-0055

Previous versions of tracing-subscriber were vulnerable to ANSI escape sequence injection attacks. Untrusted user input containing ANSI escape sequences could be injected into terminal output when logged, potentially allowing attackers to:

  • Manipulate terminal title bars
  • Clear screens or modify terminal display
  • Potentially mislead users through terminal manipulation

In isolation, impact is minimal, however security issues have been found in terminal emulators that enabled an attacker to use ANSI escape sequences via logs to exploit vulnerabilities in the terminal emulator.

This was patched in PR #3368 to escape ANSI control characters from user input.

quick-xml: Quadratic run time when checking a start tag for duplicate attribute names

RUSTSEC-2026-0194

BytesStart::attributes() returns an Attributes iterator which, by default (with_checks(true)), rejects a start tag that repeats an attribute name. For each attribute yielded, the iterator compared the new name against every name seen so far in the same tag using a linear scan, so a start tag with N distinct attribute names cost O(N²) byte comparisons. There was no bound on N other than the size of the buffered start tag.

Impact

Any code that parses untrusted XML and iterates a start tag's attributes with the default duplicate check enabled can be made to spend CPU time quadratic in the number of attributes on a single tag. Because the check is pure computation with no .await/I/O, an I/O-based timeout on the consumer (for example a read or request timeout) cannot interrupt it while it runs.

Measured cost of a single start tag, release build:

| Attributes on one tag | Time | |---|---| | 80,000 | ~6 s | | 800,000 | ~10 min |

The cost grows with the square of the attribute count, so a start tag of a few tens of megabytes can stall a parsing thread for hours. No memory is exhausted and the parser does not crash; the effect is CPU exhaustion on the thread doing the parsing: a single crafted start tag can pin a CPU core for minutes to hours, denying service to that worker. A deployment that places a wall-clock bound on parsing, or confines it to a non-critical thread, may consider the availability impact lower.

Affected code paths

  • BytesStart::attributes() / Attributes iterated with checks enabled (the default), and BytesStart::try_get_attribute.
  • NsReader, which resolves namespaces by iterating a tag's attributes and so reaches the same check internally.

Consumers that iterate attributes with .attributes().with_checks(false) and do not use NsReader are not affected.

This was reported as reachable by a remote, unauthenticated attacker in a real-world RPKI relying party (NLnet Labs Routinator) via a crafted RRDP snapshot.xml.

Remediation

Upgrade to quick-xml >= 0.41.0, where the duplicate check keeps the linear scan for start tags with a small number of attributes and switches to an O(1) hash pre-filter above a threshold, making the whole tag O(N). The reported AttrError::Duplicated positions are unchanged.

If upgrading is not possible and duplicate-name detection is not required, disable it with .attributes().with_checks(false) (this does not help NsReader consumers, which have no equivalent opt-out before 0.41.0).

quick-xml: Unbounded namespace-declaration allocation in `NsReader` enables memory-exhaustion denial of service

RUSTSEC-2026-0195

NsReader resolves namespaces by calling NamespaceResolver::push for every Start/Empty event before the event is returned to the caller. push iterated all xmlns / xmlns:* attributes on the start tag and, for each one, appended the prefix bytes to an internal buffer and pushed a NamespaceBinding (32 bytes on 64-bit) to an internal Vec, with no upper bound on the number of declarations.

Impact

A start tag with N namespace declarations drove roughly the tag's byte size in NamespaceResolver heap, allocated inside quick-xml before the NsReader consumer ever received the event and could inspect or reject it. A consumer that bounds its input size therefore still cannot bound this allocation: an M-byte start tag yields on the order of 3 × M bytes of resolver heap the caller never sees.

On untrusted XML this lets a remote, unauthenticated attacker force large heap allocations with a single start tag. With several NsReaders running concurrently on independent inputs (a common server pattern), the allocations stack and can exhaust process memory, causing the operating system to kill the process (OOM). This was confirmed against a real-world RPKI relying party (NLnet Labs Routinator), where concurrent RRDP validation workers parsing a crafted snapshot.xml exceeded the memory limit and the process was OOM-killed.

Affected code paths

Consumers using NsReader (which always calls NamespaceResolver::push before yielding Start/Empty), or calling NamespaceResolver::push directly. A plain Reader that does not perform namespace resolution is not affected.

Remediation

Upgrade to quick-xml >= 0.41.0. NamespaceResolver::push now rejects a start tag that declares more than DEFAULT_MAX_DECLARATIONS_PER_ELEMENT (256) namespace bindings, returning the new NamespaceError::TooManyDeclarations instead of allocating without limit. The limit is configurable via NamespaceResolver::set_max_declarations_per_element (use usize::MAX to restore the previous unbounded behavior), and NsReader::resolver_mut() is provided to reach it.

There is no clean workaround for NsReader consumers before 0.41.0, as the allocation happens inside the reader with no configuration knob to cap it.