CVE-2026-42839
Description
An authenticated ERPNext user with Item record edit permissions can persist arbitrary HTML/JavaScript in the item_name, description, or image fields of an Item and trigger unescaped rendering in the Point of Sale (POS) cart interface for every operator who adds that item to a transaction.This issue affects ERPNext: 16.16.0.
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Arbitrary HTML and JavaScript can be persisted in item fields and rendered unescaped in the Point of Sale cart."
Attack vector
An authenticated ERPNext user with Item record edit permissions can inject HTML/JavaScript into the item name, description, or image fields of an Item record [ref_id=1]. When another user, acting as a POS operator, adds this malicious item to a transaction, the injected payload is rendered unescaped in the POS cart interface, triggering the script execution [ref_id=1]. This can lead to arbitrary code execution in the operator's browser, such as stealing cookies [ref_id=1].
Affected code
The vulnerability lies in the rendering of cart items within the Point of Sale interface. Specifically, the `render_cart_item` function in `pos_item_cart.js` is affected, along with helper functions like `get_description_html` and `get_item_image_html` [ref_id=1]. The issue stems from the use of jQuery's `.html()` sink and direct interpolation of item names, as well as improper sanitization or escaping in these functions [ref_id=1].
What the fix does
There is currently no patch available for this vulnerability. The advisory recommends that users update to a version where the vulnerability is fixed, but does not specify which version that is [ref_id=1].
Preconditions
- authThe attacker must be an authenticated ERPNext user with Item record edit permissions.
- configThe target system must be running ERPNext version 16.16.0.
Generated on Jun 3, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
1News mentions
0No linked articles in our index yet.