GHSA-gqqj-85qm-8qhf: Paperclip Codex_local Inherited ChatGPT/OpenAI-connected Gmail And Vulnerability

HIGH
CVSS 8.7
CWE-284
Published
Advisory Summary

GHSA-gqqj-85qm-8qhf is a HIGH (CVSS 8.7) codex_local inherited chatgpt/openai-connected gmail and vulnerability (CWE-284: Improper Access Control) affecting Paperclip libraries in the npm ecosystem. The issue involves codex_local inherited chatgpt/openai-connected gmail and was able to send real email. Remediation is available in the latest vendor maintenance releases.

GHSA-gqqj-85qm-8qhf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gqqj-85qm-8qhf
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-284: Improper Access Control
Affected Product Paperclip
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-gqqj-85qm-8qhf

To remediate this vulnerability, upgrade all affected Paperclip dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

paperclipai fixed: Latest secure release
npm install paperclipai@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls paperclipai

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-gqqj-85qm-8qhf, inspect your project dependencies using npm:

npm ls paperclipai

Analyze the terminal output to locate any version of Paperclip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls paperclipai command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Paperclip, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A Paperclip-managed `codex_local` runtime was able to access and use a Gmail connector that I had connected in the ChatGPT/OpenAI apps UI, even though I had not explicitly connected Gmail inside Paperclip or separately inside Codex. In my environment this enabled mailbox access and a real outbound email to be sent from my Gmail account. After I manually intervened to stop the workflow, follow-up retraction messages were also sent, confirming repeated outward write/send capability. This appears to be a trust-boundary failure between Paperclip-managed Codex execution and inherited OpenAI app connectors, amplified by dangerous-by-default runtime settings. ### Details Successful runtime calls include: - `mcp__codex_apps__gmail_get_profile` - `mcp__codex_apps__gmail_search_emails` - `mcp__codex_apps__gmail_send_email` The connected Gmail profile resolved to my personal account. Inside the Paperclip-managed `codex-home`, I also found cached OpenAI curated connector state for Gmail under a path like: - `codex-home/plugins/cache/openai-curated/gmail/.../.app.json` This strongly suggests that the runtime had access to an already connected OpenAI apps surface rather than a Paperclip-specific Gmail integration that I intentionally configured. Separately, in the installed Paperclip code, `codex_local` defaults `dangerouslyBypassApprovalsAndSandbox` to `true`, and the server-side agent creation path applies that default when the flag is omitted. In practice, that makes this boundary failure much more dangerous because a newly created `codex_local` agent can operate with approvals and sandbox bypassed by default. The key issue is this: I had connected Gmail only in the ChatGPT/OpenAI apps UI. I had not intentionally connected Gmail inside Paperclip or separately inside Codex. Despite that, the Paperclip-managed `codex_local` runtime was able to use Gmail read/write actions. ### PoC Environment: - self-hosted Paperclip instance using `codex_local` - Gmail connected in the ChatGPT/OpenAI apps UI - no explicit Gmail connection configured inside Paperclip for this test - `codex_local` agent created and run with default behavior Observed reproduction path: 1. Connect Gmail in the ChatGPT/OpenAI apps UI. 2. Create or run a Paperclip `codex_local` agent. 3. Execute a task that inspects mailbox state or performs outward communication. 4. Observe successful Gmail connector calls such as: - `mcp__codex_apps__gmail_get_profile` - `mcp__codex_apps__gmail_search_emails` - `mcp__codex_apps__gmail_send_email` 5. Observe that the connected profile resolves to the ChatGPT/OpenAI-connected Gmail account and that mailbox reads and real sends are possible. Private evidence available on request: - successful `get_profile` / `search` / `send` logs - Paperclip-managed `codex-home` Gmail connector cache path(s) - screenshot showing Gmail write-capable actions such as `send_email`, `send_draft`, and `update_draft` exposed in the connected-app UI - incident timeline showing that a real outbound email was sent - recipient organizations, timestamps, message IDs, and sanitized evidence for both the original outbound email and the subsequent retraction messages ### Impact This was not only theoretical in my environment. It resulted in: - mailbox identity disclosure - mailbox search / thread access - a real outbound email being sent from a personal connected Gmail account to an external third party - follow-up retraction messages being sent after manual intervention, confirming repeated outward write/send capability From an operator/security perspective, connecting Gmail in the ChatGPT/OpenAI apps UI should not automatically make that connector available to a Paperclip-managed local agent runtime, especially not for write/send actions. One or more of the following: - no inherited OpenAI app connectors by default in Paperclip-managed `codex_local` runs - send/write connectors blocked by default - explicit Paperclip-side opt-in before outward actions - auditable approval and provenance for connector-mediated actions - safer defaults, including `dangerouslyBypassApprovalsAndSandbox = false`

GHSA-gqqj-85qm-8qhf Affected Paperclip Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
paperclipai
npm
≤ 2026.403.0

References

Frequently Asked Questions

What is GHSA-gqqj-85qm-8qhf?
GHSA-gqqj-85qm-8qhf is a security vulnerability in Paperclip involving codex_local inherited ChatGPT/OpenAI-connected Gmail and was able to send real email under CWE-284: Improper Access Control.
Which Paperclip versions are affected?
Affected versions include releases prior to current release patches across affected packages: paperclipai.
What version fixes GHSA-gqqj-85qm-8qhf?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is paperclipai affected?
Yes, paperclipai is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-gqqj-85qm-8qhf?
GHSA-gqqj-85qm-8qhf has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with GHSA-gqqj-85qm-8qhf?
GHSA-gqqj-85qm-8qhf is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for GHSA-gqqj-85qm-8qhf?
Run the dependency tree command: 'npm ls paperclipai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gqqj-85qm-8qhf",
  "modified" : "2026-04-16T22:47:40Z",
  "published" : "2026-04-16T22:47:40Z",
  "aliases" : [ ],
  "summary" : "Paperclip: codex_local inherited ChatGPT/OpenAI-connected Gmail and was able to send real email",
  "details" : "### Summary\n\nA Paperclip-managed `codex_local` runtime was able to access and use a Gmail connector that I had connected in the ChatGPT/OpenAI apps UI, even though I had not explicitly connected Gmail inside Paperclip or separately inside Codex.\n\nIn my environment this enabled mailbox access and a real outbound email to be sent from my Gmail account. After I manually intervened to stop the workflow, follow-up retraction messages were also sent, confirming repeated outward write/send capability.\n\nThis appears to be a trust-boundary failure between Paperclip-managed Codex execution and inherited OpenAI app connectors, amplified by dangerous-by-default runtime settings.\n\n### Details\n\nSuccessful runtime calls include:\n\n- `mcp__codex_apps__gmail_get_profile`\n- `mcp__codex_apps__gmail_search_emails`\n- `mcp__codex_apps__gmail_send_email`\n\nThe connected Gmail profile resolved to my personal account.\n\nInside the Paperclip-managed `codex-home`, I also found cached OpenAI curated connector state for Gmail under a path like:\n\n- `codex-home/plugins/cache/openai-curated/gmail/.../.app.json`\n\nThis strongly suggests that the runtime had access to an already connected OpenAI apps surface rather than a Paperclip-specific Gmail integration that I intentionally configured.\n\nSeparately, in the installed Paperclip code, `codex_local` defaults `dangerouslyBypassApprovalsAndSandbox` to `true`, and the server-side agent creation path applies that default when the flag is omitted. In practice, that makes this boundary failure much more dangerous because a newly created `codex_local` agent can operate with approvals and sandbox bypassed by default.\n\nThe key issue is this: I had connected Gmail only in the ChatGPT/OpenAI apps UI. I had not intentionally connected Gmail inside Paperclip or separately inside Codex. Despite that, the Paperclip-managed `codex_local` runtime was able to use Gmail read/write actions.\n\n### PoC\n\nEnvironment:\n\n- self-hosted Paperclip instance using `codex_local`\n- Gmail connected in the ChatGPT/OpenAI apps UI\n- no explicit Gmail connection configured inside Paperclip for this test\n- `codex_local` agent created and run with default behavior\n\nObserved reproduction path:\n\n1. Connect Gmail in the ChatGPT/OpenAI apps UI.\n2. Create or run a Paperclip `codex_local` agent.\n3. Execute a task that inspects mailbox state or performs outward communication.\n4. Observe successful Gmail connector calls such as:\n   - `mcp__codex_apps__gmail_get_profile`\n   - `mcp__codex_apps__gmail_search_emails`\n   - `mcp__codex_apps__gmail_send_email`\n5. Observe that the connected profile resolves to the ChatGPT/OpenAI-connected Gmail account and that mailbox reads and real sends are possible.\n\nPrivate evidence available on request:\n\n- successful `get_profile` / `search` / `send` logs\n- Paperclip-managed `codex-home` Gmail connector cache path(s)\n- screenshot showing Gmail write-capable actions such as `send_email`, `send_draft`, and `update_draft` exposed in the connected-app UI\n- incident timeline showing that a real outbound email was sent\n- recipient organizations, timestamps, message IDs, and sanitized evidence for both the original outbound email and the subsequent retraction messages\n\n### Impact\n\nThis was not only theoretical in my environment. It resulted in:\n\n- mailbox identity disclosure\n- mailbox search / thread access\n- a real outbound email being sent from a personal connected Gmail account to an external third party\n- follow-up retraction messages being sent after manual intervention, confirming repeated outward write/send capability\n\nFrom an operator/security perspective, connecting Gmail in the ChatGPT/OpenAI apps UI should not automatically make that connector available to a Paperclip-managed local agent runtime, especially not for write/send actions.\n\nOne or more of the following:\n\n- no inherited OpenAI app connectors by default in Paperclip-managed `codex_local` runs\n- send/write connectors blocked by default\n- explicit Paperclip-side opt-in before outward actions\n- auditable approval and provenance for connector-mediated actions\n- safer defaults, including `dangerouslyBypassApprovalsAndSandbox = false`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "paperclipai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2026.403.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/paperclipai/paperclip/security/advisories/GHSA-gqqj-85qm-8qhf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/paperclipai/paperclip"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-16T22:47:40Z",
    "nvd_published_at" : null
  }
}