CVE-2022-29527
AWS Systems Manager Agent (SSM) vulnerability analysis and mitigation

Overview

Amazon AWS amazon-ssm-agent before version 3.1.1208.0 contained a vulnerability that created a world-writable sudoers file, which could allow local attackers to inject Sudo rules and escalate privileges to root. The vulnerability (CVE-2022-29527) was discovered by Matthias Gerstner from SUSE and was disclosed on April 20, 2022. The issue occurred in certain situations involving a race condition where the sudoers file was temporarily created with world-writable permissions (0666) before being changed to the correct permissions (SUSE Bugzilla, NVD).

Technical details

The vulnerability existed in the agent/session/utility/utility_unix.go file of the amazon-ssm-agent. During the creation of the sudoers file, the code used os.Create() which created the file with default permissions (0666), making it world-writable. Although the code later changed the permissions to 0440, there was a window of opportunity where the file was writable by all users. The issue was particularly concerning on systems where /etc/sudoers.d was world-readable, such as Debian Linux with 755 permissions (SUSE Bugzilla).

Impact

The vulnerability could allow local attackers to inject Sudo rules during the window when the sudoers file was world-writable, potentially leading to privilege escalation to root. The impact was most severe on systems where the /etc/sudoers.d directory was world-readable (CloudVulnDB).

Mitigation and workarounds

The vulnerability was fixed in amazon-ssm-agent version 3.1.1208.0. The fix changed the file creation process to use os.OpenFile with specific permissions (0640) instead of os.Create with default permissions. Users should upgrade to version 3.1.1208.0 or later to address this vulnerability (GitHub Commit, GitHub Release).

Additional resources


SourceThis report was generated using AI

Related AWS Systems Manager Agent (SSM) vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61729HIGH7.5
  • cAdvisorcAdvisor
  • libcap-static
NoYesDec 02, 2025
CVE-2025-47913HIGH7.5
  • PackerPacker
  • eks-distro-fips-1.30
NoYesNov 13, 2025
CVE-2025-61725HIGH7.5
  • cAdvisorcAdvisor
  • external-dns-fips-0.16
NoYesOct 29, 2025
CVE-2025-61727MEDIUM6.5
  • cAdvisorcAdvisor
  • portieris-fips
NoYesDec 03, 2025
CVE-2025-47914MEDIUM5.3
  • cAdvisorcAdvisor
  • tekton-pipelines-1.0
NoYesNov 19, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management