Advisory

GO-2022-1095

Also known as: BIT-golang-2022-41716, CVE-2022-41716

Summary

Unsanitized NUL in environment variables on Windows in syscall and os/exec

Details

Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows.

In syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string "A=B\x00C=D" sets the variables "A=B" and "C=D".

Severity

Not rated by the source.

Dates

Published
2022-11-01 23:55 UTC
Modified
2026-02-04 04:25 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.18.8, introduced 1.19.0-0, fixed 1.19.3 (semver)

Fixed versions

1.18.8, 1.19.3

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences