Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-107841 Overview
CVE-2026-107841 is an authorization flaw [CWE-863] in pacioli, a least-privilege governance layer and governed agent broker for ERPNext. The pacioli-guard document-layer consent gate fails to validate that a consent marker authorizes cancellation when nested cancellation operations occur inside an enclosing governed act. An attacker holding a credential with API Key Scope.require_consent can submit a caller-controlled document under a valid submit marker and reach Document.cancel() on a different, pre-existing submitted document. The flaw affects versions 0.9.6 through 0.9.x and is fixed in version 0.10.0.
Critical Impact
Unauthorized cancellation reverses the target document's ledger effect, bypassing document binding, act binding, single-use spend, and the denial audit trail.
Affected Products
- pacioli-guard version 0.9.6 through versions earlier than 0.10.0
- ERPNext deployments integrating pacioli-guard for consent-gated document operations
- Governed agent broker workflows using human-minted submit markers
Discovery Timeline
- 2026-10-09 - CVE-2026-107841 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-107841
Vulnerability Analysis
The vulnerability resides in the pacioli-guard document-layer consent gate, which brokers governed acts against ERPNext documents. When a human-minted submit marker authorizes a specific submit operation, the gate correctly binds that marker to the target document and act. The failure occurs when the authorized submit chain triggers a nested cancellation operation inside the same governed act. The gate does not re-check whether the enclosing marker authorizes cancellation on the referenced document. Instead, it allows the nested Document.cancel() invocation to inherit the parent consent. This bypasses document binding, act binding, single-use spend tracking, and denial auditing.
Root Cause
The root cause is incorrect authorization scope inheritance in nested document operations. The consent marker is treated as sufficient for any child operation reachable from the authorized submit, rather than being re-validated for each distinct act and document pairing. This is a classic authorization check omission [CWE-863] in a transitive call path.
Attack Vector
An authenticated principal holding a credential scoped with API Key Scope.require_consent submits a caller-controlled document, such as a Sales Invoice, under a legitimately minted human submit marker. The attacker arranges the submission so that server-side logic reaches Document.cancel() against a different, pre-existing submitted document chosen by the attacker. The reversal silently undoes the ledger effect of the target document without producing the denial audit record that would normally fire on an unauthorized cancellation.
# Patch excerpt — broker/pacioli/doctor.py (release: guard 0.10.0)
def run_doctor(env, *, target_name=None, offline=False,
read_file=None, transport=default_transport, findings_out=None):
"""Run every check; return ``(exit_code, lines)``. Exit is 0 only with zero failures.
``findings_out``: an optional list that receives the STRUCTURED ``(level, message)`` tuples as
they are produced. It exists so `pacioli receipt` never has to parse the display strings back
into data — the formatted line is a rendering, and reconstructing data from a rendering is how
a display change silently becomes a logic change.
"""
if read_file is None:
read_file = lambda p: Path(p).read_text(encoding="utf-8")
lines, failed = ["pacioli doctor — config & readiness (read-only)"], False
Source: GitHub Commit f3c7219
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-107841
Indicators of Compromise
- Cancellation events on submitted documents that lack a corresponding human-minted cancellation marker in the pacioli-guard audit trail.
- Submit events on caller-controlled documents immediately followed by Document.cancel() calls against unrelated, pre-existing documents within the same request context.
- ERPNext ledger reversals initiated by API Key principals carrying the require_consent scope without a matching denial or consent audit entry.
Detection Strategies
- Review pacioli-guard audit logs for consent markers whose act binding does not match the terminal operation recorded against the ledger.
- Correlate ERPNext document state transitions between Submitted and Cancelled with the originating API Key and marker identifier.
- Compare the set of cancellations against the set of minted cancellation markers; any delta represents a bypass candidate.
Monitoring Recommendations
- Enable verbose logging on the pacioli-guard consent gate to capture nested act invocations within a single governed call.
- Alert on any Document.cancel() reached through a submit-scoped marker and ship the events to a centralized SIEM such as Singularity Data Lake for retention and correlation.
- Track single-use spend counters per marker to detect markers consumed by acts outside their declared binding.
How to Mitigate CVE-2026-107841
Immediate Actions Required
- Upgrade pacioli-guard to version 0.10.0 or later, which enforces act and document binding on nested cancellation operations.
- Rotate API Keys scoped with require_consent and audit historical usage for unauthorized cancellations.
- Reconcile the ERPNext ledger against expected document states to identify any reversed transactions attributable to the flaw.
Patch Information
The fix is published in GitHub Release v0.10.0 and tracked in GitHub Security Advisory GHSA-3hj7-6vmj-h8v4. The remediation commit is available at GitHub Commit f3c7219. Version 0.10.0 enforces explicit consent validation on each distinct act and document pair in a nested call chain.
Workarounds
- Revoke the require_consent scope from API Keys that do not require governed cancellation authority until the upgrade is applied.
- Restrict submit flows for caller-controlled document types so that server-side logic cannot reach Document.cancel() on unrelated documents.
- Add compensating controls that require independent human approval for any ledger reversal on submitted documents.
# Upgrade pacioli-guard to the patched release
pip install --upgrade 'pacioli-guard>=0.10.0'
# Verify the installed version
python -c "import pacioli; print(pacioli.__version__)"
# Run the read-only readiness check shipped with 0.10.0
pacioli doctor --receipt > pacioli-receipt.txt
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

