CVE-2022-29526: Incorrect privilege reporting in syscall and golang.org/x/sys/unix

stdlib Updated 02 Oct 2025

Summary

15/07/2022
Yes i
Unrated
Not published

CVE-2022-29526: Incorrect privilege reporting in syscall and golang.org/x/sys/unix. Affects stdlib across 2 version ranges.

< 1.17.10 >= 1.18.0-0, < 1.18.2

Fixed in 1.17.10 or 1.18.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-29526 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Go standard library (stdlib) and golang.org/x/sys package are widely used in Go applications for various system-related operations. The stdlib package provides core functionality for Go programs, while the golang.org/x/sys package offers lower-level system calls and interfaces. These packages are vulnerable to an issue where the Faccessat function incorrectly reports file accessibility when called with a non-zero flags parameter.

Vulnerability Detail

The vulnerability arises from a flaw in the Faccessat function, which can lead to incorrect privilege reporting. When the function is invoked with a non-zero flags parameter, it may erroneously indicate that a file is accessible when it is not. This vulnerability can have serious consequences, as it may allow unauthorized access to sensitive files or resources. It is important to note that this vulnerability affects both the stdlib and golang.org/x/sys packages.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.17.10 1.17.10
    go get stdlib@v1.17.10
  • >= 1.18.0-0, < 1.18.2 1.18.2
    go get stdlib@v1.18.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, developers can avoid using the Faccessat function with a non-zero flags parameter. Instead, they can use alternative methods or functions provided by the packages to perform file accessibility checks. Here is an example of a workaround using the stdlib package:

def checkFileAccessibility(path string) (bool, error) {
    fileInfo, err := os.Stat(path)
    if err != nil {
        return false, err
    }
    // Perform additional checks if needed
    return true, nil
}

Conclusion

In conclusion, the Faccessat function in the Go stdlib and golang.org/x/sys packages suffers from a vulnerability that can result in incorrect privilege reporting. It is crucial to update the affected packages to the fixed versions to mitigate the risk of unauthorized access to files or resources. If you require further assistance or support in addressing this vulnerability, please reach out to DevNack.com.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

This vulnerability can potentially allow unauthorized access to files or resources, leading to data breaches or other security incidents.

The vulnerability affects the Go standard library (stdlib) and the golang.org/x/sys package.

At the time of this report, there are no known exploits for this vulnerability. However, it is crucial to apply the recommended fixes to mitigate the risk.

You can use Vulert's vulnerability monitoring service to check if your application is affected by this vulnerability. Vulert analyzes your Gopkg.lock file and provides real-time alerts for open-source vulnerabilities.

You can find more information about this vulnerability, including technical details and the fixed versions, in the vulnerability report available at the following URL: https://pkg.go.dev/vuln/GO-2022-0493

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.17.10 1.17.10
    go get stdlib@v1.17.10
  • >= 1.18.0-0, < 1.18.2 1.18.2
    go get stdlib@v1.18.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback