# Security review for code written with Cursor

> Rare Agentics is a UK software and AI agent engineering firm that reviews apps built with Cursor. We start with what the developer accepted, which means secrets in the repository history, endpoints with no authorisation check and packages nobody read. Every finding is reproduced and ranked in a written report. A review takes 1 to 3 weeks.

Source https://rareagentics.com/security-review-for-ai-built-apps/cursor. Last reviewed 2026-12-04.

## What does Cursor set up for you?

Cursor is an editor with an agent that reads and edits files and runs terminal commands in your own repository. It does not choose your stack, your database or your hosting. Its documentation says agents can change workspace files without approval, apart from configuration files, so what ships is whatever the developer accepted.

## Where do apps built with Cursor usually go wrong?

- **Secrets committed to the repository.** A key written into a file so a feature works, then committed, stays in the Git history after the line is deleted. GitHub’s secret scanning reads the entire history on all branches for this reason.
- **Endpoints that check sign-in but not ownership.** An agent asked for an endpoint that returns an order will write one that returns an order. Whether the caller owns that order is a separate question, and OWASP ranks broken access control first in its 2025 Top 10.
- **Dependencies added without review.** An agent adds whatever package solves the task in front of it. Nobody may have checked who maintains each one, whether it is still supported or what it runs when it installs.
- **Agent configuration carried in the repository.** A project can hold a .cursor/mcp.json file that tells the agent which outside tools to run. Three published advisories (CVE-2025-54135, CVE-2025-54136 and CVE-2025-59944) describe ways such files could be created or altered to run commands on a developer’s machine, fixed in Cursor versions 1.3.9, 1.3 and 1.7.
- **Rules files that steer every change.** Cursor’s documentation says rule contents are included at the start of the model context. A rules file copied from a template or another project shapes all the code that follows, and the same page says AI guidance should not be your only security control.
- **Guardrails treated as a boundary.** Cursor describes its run modes as best-effort guardrails and not a hard security boundary, and says its ignore file cannot stop terminal or MCP tools from reading a file. A team that relied on either may have exposed more to the agent than it intended.

## What do we check in a Cursor app?

1. **The full Git history for secrets.** We scan every branch and every past commit for keys, tokens and passwords, and list each one with the provider it belongs to so it can be rotated.
2. **Authorisation on every route.** We map each endpoint, server function and background job, then test whether one test user can read or change another test user’s records.
3. **The data layer’s own rules.** Where the app uses Supabase we test row level security on every table. Where it uses another database we check how the server limits each query to the caller’s data.
4. **Dependencies and the lockfile.** We check each package against published advisories, look for abandoned or lookalike packages and confirm the lockfile matches what is deployed.
5. **The .cursor folder and agent instructions.** We read the rules files, AGENTS.md and any MCP configuration in the repository, and check which outside tools the agent was allowed to run.
6. **Cursor versions on the team’s machines.** We compare the versions in use with the fixed versions named in Cursor’s published advisories.
7. **Hosting, environment variables and the pipeline.** We review where secrets are stored in the hosting account, who can deploy and what the build pipeline can reach.
8. **Sign-in, limits and what leaves for AI providers.** We test account recovery and rate limits, and check what code and customer data are sent to model providers, including whether Privacy Mode is on.

## What can you check in your Cursor app today?

1. **Read the secret scanning alerts on your repository.** If your code is on GitHub, read its secret scanning alerts. GitHub runs secret scanning free on public repositories, and it reads the whole history and not only the latest code.
2. **Rotate any key that was ever committed.** GitHub’s guidance is to revoke or rotate the secret first. Deleting the line or rewriting history does not make an exposed key safe.
3. **Update Cursor on every machine.** Ask each developer which version they are running and update to the current release. The published advisories were fixed by version 1.7.
4. **Read the .cursor folder in your repository.** Open the rules files and any mcp.json file. Remove any tool or instruction that nobody on the team can explain.
5. **Test with two accounts of your own.** Create two test accounts in your app. Sign in as one, copy the address of a record, then sign in as the other and open it.
6. **Run your package manager’s audit.** Run the audit command for your package manager, such as npm audit, and read the high and critical results.

## Questions

### Do we have to rebuild an app written with Cursor?

Rarely. The usual result is a list of targeted fixes, such as keys rotated, authorisation checks added to named endpoints and a few packages replaced. If a rebuild is the honest answer we will say so in the report and explain why.

### Cursor is an editor. What is there to review?

The code it helped write and the configuration it left behind. Cursor does not pick your stack or hosting, so the risks are in what was accepted, which is why we read the repository, its history and its agent settings as well as the running app.

### Is Cursor now called Grok Build?

Cursor’s own site says Cursor is now Grok Build, and its documentation is published at docs.grok.com. The project files keep the .cursor names, so the review is the same whichever name your team uses.

### Do the Cursor advisories mean our app was compromised?

Not by themselves. They describe ways a developer’s machine could be made to run commands through agent configuration files, and each was fixed in a named version. We check the versions in use and the configuration in your repository, and say plainly if anything needs a closer look.

### Is the review a penetration test?

No. It is an engineering-led review of your code, repository and configuration, with every finding reproduced. It is not a certification. If a customer or investor needs a certified penetration test we will say so and work alongside the firm you choose.

## Sources

1. [Agent security](https://docs.grok.com/build/agents-window/agent/security), Cursor (Anysphere)
2. [Rules](https://docs.grok.com/build/agents-window/rules), Cursor (Anysphere)
3. [Model context protocol (MCP)](https://docs.grok.com/build/agents-window/mcp), Cursor (Anysphere)
4. [Ignore file](https://docs.grok.com/build/agents-window/reference/ignore-file), Cursor (Anysphere)
5. [Security](https://cursor.com/security), Cursor (Anysphere)
6. [CVE-2025-54135](https://www.cve.org/CVERecord?id=CVE-2025-54135), CVE Program (GitHub)
7. [CVE-2025-54136](https://www.cve.org/CVERecord?id=CVE-2025-54136), CVE Program (GitHub)
8. [CVE-2025-59944](https://www.cve.org/CVERecord?id=CVE-2025-59944), CVE Program (GitHub)
9. [Secret scanning](https://docs.github.com/en/code-security/concepts/secret-security/secret-scanning), GitHub
10. [Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security), Supabase
11. [Removing sensitive data from a repository](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository), GitHub
12. [A01 Broken Access Control, OWASP Top 10 2025](https://top10.owasp.org/2025/A01_2025-Broken_Access_Control), OWASP Foundation

---

Rare Agentics is a UK software and AI agent engineering firm based in London. Rare Agentics Limited, company number 17494524. Contact hello@rareagentics.com or https://rareagentics.com/contact. Book a call at https://rareagentics.com/book-a-call.
