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.
Remediation
References
https://github.com/square/connect-java-sdk/blob/master/src/main/java/com/squareup/connect/ApiClient.java%23L613
https://snyk.io/vuln/SNYK-JAVA-COMSQUAREUP-1065988
Related Vulnerabilities
CVE-2020-7768 Vulnerability in npm package grpc
CVE-2020-2256 Vulnerability in maven package org.jenkins-ci.plugins:pipeline-maven-parent
CVE-2022-23106 Vulnerability in maven package io.jenkins:configuration-as-code
CVE-2020-2168 Vulnerability in maven package org.jenkins-ci.plugins:azure-acs
CVE-2019-0199 Vulnerability in maven package org.apache.tomcat:tomcat-coyote