# Insecure temporary file used in com.squareup:connect

Advisory record · `GHSA-q4hm-fwc9-hmv6`

- **Identifiers:** `GHSA-q4hm-fwc9-hmv6` · `CVE-2021-23331`
- **State:** Confirmed
- **Severity:** CVSS 4.4 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-377](https://cwe.mitre.org/data/definitions/377.html)
- **Tags:** [CWE-377](https://agentprime.io/advisories/tag/cwe-377.md)
- **Published:** 16 Jun 2021
- **Updated:** 13 Mar 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 16 Jun 2021, 17:53 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `com.squareup:connect` (Maven): affected `<=2.20191120.0`; no fixed version yet

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Insecure temporary file handling affects com.squareup:connect versions up to and including 2.20191120.0, with no fixed version listed. A local user on a Unix-like system can read the contents of files downloaded by the SDK, because the temporary file is created with world-readable permissions in the shared system temporary directory. As a workaround, set the java.io.tmpdir system property to a directory that only trusted users can access. The source notes this SDK version is end of life and recommends upgrading to the latest version.

Written 3 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 4.4 Medium, CVSS 3.1: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N/E:P/RL:W/RC:C`, from CNA (snyk)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0035, the 28th percentile, on 6 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:20 UTC: First seen by agentprime
- 31 Oct 2026, 14:20 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-q4hm-fwc9-hmv6)

## Sources

- [GitHub Advisory Database: GHSA-q4hm-fwc9-hmv6](https://github.com/advisories/GHSA-q4hm-fwc9-hmv6)
- [OSV: GHSA-q4hm-fwc9-hmv6](https://osv.dev/vulnerability/GHSA-q4hm-fwc9-hmv6)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23331>
- <https://github.com/square/connect-java-sdk>
- <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>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-q4hm-fwc9-hmv6>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-q4hm-fwc9-hmv6/>. Everything for agents: <https://agentprime.io/llms.txt>.
