Images added in context get added in repo history

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Images added to chat history get added to repo history and get committed to git with commits. In case a secrets was shared for agent to work on locally they also gets committed to git, this creates a security risk.

Steps to Reproduce

paste an image into context window it gets copied into assets directory in the repo

Expected Behavior

Any image added as context to conversation should not be stored in the repo.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.49 (user setup)
VSCode Version: 1.105.1
Commit: 21a2ed198584d56a91c0b996d1a09c93f8538440
Date: 2025-12-05T07:49:06.016Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

Hey, thanks for the report. This looks like a potential security ridge.

We need details for a precise repro:

  • Where exactly files are saved after pasting an image: full path and folder name
  • Do you use any image paste extensions (e.g., Paste Image)? Can you reproduce if you start Cursor with extensions disabled and try again
  • Minimal repro: empty repo, exact steps, a short video or screenshots
  • Example commit with SHA and diff, plus your .gitignore contents
  • Logs: Help > Toggle Developer Tools > Console, then paste an image and share the output

Once you send the details and logs, I can pass this to the team right away.

Hey, having the same issue.

  • Files are saved into assets directory of my repo.
  • It only saves once I send the message with image attachment, not when attached.
  • Using Gemini 3 Pro.
  • Just drag and dropping the image into chat box - no extensions.
1 Like

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor generates a 0 byte image file in the /assets folder of my project every time I upload a screenshot via the chat sidebar.

Steps to Reproduce

Take any screenshot, and paste it into the chat sidebar, within moments you will notice a new 0 byte image in version control. The images all names in the form “image-[UUID].png.”

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.50 (Universal)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0

For AI issues: which model did you use?

Auto

For AI issues: add Request ID with privacy disabled

Request ID: da4b9881-be71-45b1-a171-9ab8e6df298e

Does this stop you from using Cursor

No - Cursor works, but with this issue

plus 1. this is also happening to me

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.