CVE-2021-23331 Insecure Temporary File

Medium 4.4 Published Updated

Local attackers can read downloaded files due to insecure temporary file permissions in the Squareup Connect SDK.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-23331?

CVE-2021-23331 is a medium-severity vulnerability in com.squareup:connect, published on 3 Feb 2021. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

This affects all versions of package com.squareup:connect. The method prepareDownloadFilecreates creates a temporary file with the permissions bits of -rw-r--r-- on unix-like systems. On unix-like systems, the system temporary directory is shared between users. As such, the contents of the file downloaded by downloadFileFromResponse will be visible to all other users on the local system. A workaround fix for this issue is to set the system property java.io.tmpdir to a safe directory as remediation. Note: This version of the SDK is end of life and no longer maintained, please upgrade to the latest version.

Which versions are affected by CVE-2021-23331?

2 open source packages ship an affected version, including com.squareup:connect. It affects 1 product.

PackageAffectedFixed in
com.squareup:connect MavenAll versions to 2.20191120.0None
com.squareup:connect MavenAll versions to 2.20191120.0None

Products include Squareup Connect Java Software Development Kit.

How do I fix CVE-2021-23331?

No fix has been published for CVE-2021-23331 yet. Limit exposure of the affected software until one is available.

Is CVE-2021-23331 being exploited?

There is no known exploitation of CVE-2021-23331 in the wild and no public exploit code.

Sources

Also known as GHSA-q4hm-fwc9-hmv6.

Is CVE-2021-23331 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free