CVE-2022-29526: Golang.org/x/sys Golang.org/x/sys/unix Has Incorrect Privilege Reporting Vulnerability

MODERATE
Advisory Identifier: GHSA-p782-xgp4-8hr8
CVSS 5.3
CWE-269
Published
Advisory Summary

CVE-2022-29526 is a MODERATE (CVSS 5.3) golang.org/x/sys/unix has incorrect privilege reporting vulnerability (CWE-269: Improper Privilege Management) affecting Golang.org/x/sys libraries in the Go ecosystem. The issue involves golang.org/x/sys/unix has incorrect privilege reporting in syscall. Remediation is available by upgrading affected packages to version 0.0.0-20220412211240-33da011f77ad.

CVE-2022-29526 at a Glance

CVE Identifier CVE-2022-29526
GHSA Identifier GHSA-p782-xgp4-8hr8
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-269: Improper Privilege Management
Affected Product Golang.org/x/sys
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2022-29526

To remediate this vulnerability, upgrade all affected Golang.org/x/sys dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

golang.org/x/sys fixed: 0.0.0-20220412211240-33da011f77ad
Upgrade golang.org/x/sys to 0.0.0-20220412211240-33da011f77ad
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for golang.org/x/sys

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-29526, inspect your project dependencies for Golang.org/x/sys:

inspect dependencies for golang.org/x/sys

Analyze the terminal output to locate any version of Golang.org/x/sys in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20220412211240-33da011f77ad), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Golang.org/x/sys, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Go before 1.17.10 and 1.18.x before 1.18.2 has Incorrect Privilege Reporting in syscall. When called with a non-zero flags parameter, the Faccessat function could incorrectly report that a file is accessible. ### Specific Go Packages Affected golang.org/x/sys/unix

CVE-2022-29526 Affected Golang.org/x/sys Versions

1 component(s)
Fixed Versions:
0.0.0-20220412211240-33da011f77ad
Product / Package Ecosystem Affected Versions Fixed Version
golang.org/x/sys
Go
< 0.0.0-20220412211240-33da011f77ad
0.0.0-20220412211240-33da011f77ad

References

NVD — CVE-2022-29526 NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-29526
Golang.org/x/sys Source Repository REPOSITORY
https://github.com/golang/go/issues/52313
Golang.org/x/sys Source Repository REPOSITORY
https://github.com/golang/go
go.dev/cl/399539 WEB
https://go.dev/cl/399539
go.dev/cl/400074 WEB
https://go.dev/cl/400074
go.dev/issue/52313 WEB
https://go.dev/issue/52313
groups.google.com/g/golang-announce WEB
https://groups.google.com/g/golang-announce
groups.google.com/g/golang-announce/c... WEB
https://groups.google.com/g/golang-announce/c/Y5qrqw_lWdU
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Q6GE5EQGE4L2KRVGW4T75QVIYAXCLO5X
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RQXU752ALW53OJAF5MG3WMR5CCZVLWW6
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z55VUVGO7E5PJFXIOVAY373NZRHBNCI5
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZY2SLWOQR4ZURQ7UBRZ7JIX6H6F5JHJR
pkg.go.dev/vuln/go-2022-0493 WEB
https://pkg.go.dev/vuln/GO-2022-0493
Golang.org/x/sys Security Information SECURITY
https://security.gentoo.org/glsa/202208-02
Golang.org/x/sys Security Information SECURITY
https://security.netapp.com/advisory/ntap-20220729-0001

Frequently Asked Questions

What is CVE-2022-29526?
CVE-2022-29526 is a security vulnerability in Golang.org/x/sys involving golang.org/x/sys/unix has Incorrect privilege reporting in syscall under CWE-269: Improper Privilege Management.
Which Golang.org/x/sys versions are affected?
Affected versions include releases prior to 0.0.0-20220412211240-33da011f77ad across affected packages: golang.org/x/sys.
What version fixes CVE-2022-29526?
Upgrading to 0.0.0-20220412211240-33da011f77ad (or the latest patched release for your respective branch) resolves the vulnerability.
Is golang.org/x/sys affected?
Yes, golang.org/x/sys is affected in releases prior to 0.0.0-20220412211240-33da011f77ad. Upgrade your dependency to 0.0.0-20220412211240-33da011f77ad or later.
What is the CVSS score of CVE-2022-29526?
CVE-2022-29526 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2022-29526?
CVE-2022-29526 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2022-29526?
Run the dependency tree command: 'inspect dependencies for golang.org/x/sys'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p782-xgp4-8hr8",
  "modified" : "2024-05-20T21:27:32Z",
  "published" : "2022-06-24T00:00:30Z",
  "aliases" : [ "CVE-2022-29526" ],
  "summary" : "golang.org/x/sys/unix has Incorrect privilege reporting in syscall",
  "details" : "Go before 1.17.10 and 1.18.x before 1.18.2 has Incorrect Privilege Reporting in syscall. When called with a non-zero flags parameter, the Faccessat function could incorrectly report that a file is accessible.\n\n### Specific Go Packages Affected\ngolang.org/x/sys/unix",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "golang.org/x/sys"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20220412211240-33da011f77ad"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29526"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/golang/go/issues/52313"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/golang/go"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/cl/399539"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/cl/400074"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/issue/52313"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/golang-announce"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/golang-announce/c/Y5qrqw_lWdU"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Q6GE5EQGE4L2KRVGW4T75QVIYAXCLO5X"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RQXU752ALW53OJAF5MG3WMR5CCZVLWW6"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z55VUVGO7E5PJFXIOVAY373NZRHBNCI5"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZY2SLWOQR4ZURQ7UBRZ7JIX6H6F5JHJR"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0493"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202208-02"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20220729-0001"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-08T00:30:54Z",
    "nvd_published_at" : "2022-06-23T17:15:00Z"
  }
}