DescriptionA flaw was found in Ansible Engine when a file is moved using atomic_move primitive as the file mode cannot be specified. This sets the destination files world-readable if the destination file does not exist and if the file exists, the file could be changed to have less restrictive permissions before the move. This could lead to the disclosure of sensitive data. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs966663

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
ansible (PTS)buster2.7.7+dfsg-1+deb10u1vulnerable
buster (security)2.7.7+dfsg-1+deb10u2vulnerable
sid, trixie9.5.1+dfsg-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs

Notes (closed upstream) (not merged)
The issue will not be fixed source-wise, but to avoid the issue raised in
CVE-2020-1736 one should specify a mode parameter in all file-based tasks
that accept it, cf.
That just leaves a race condition in place where newly created files that
specify a mode in the task briefly go from (666 - umask) to the final mode.
An alternative workaround if many new files are ansible.builtin.copy mode=preserve
that preserve file mode from controller to managed host.
Documentation fix:

Search for package or bug name: Reporting problems