, ,

How to enable JSON schema validation in Cursor

a photo of a floor plan

If you open a JSON file in Cursor and notice that $schema validation isn’t working — no errors for wrong types, no warnings for unknown properties — you’re not imagining it. Cursor disables remote schema fetching by default. Here’s why, and how to turn it back on.

Why it’s disabled

This is intentional. CVE-2025-49150, published in June 2025, explains why: Cursor’s AI Agent can autonomously write and modify JSON files, and if json.schemaDownload.enable is on, any JSON file containing a $schema field triggers an outbound HTTP GET request without user confirmation. A compromised agent could point $schema at an attacker-controlled URL to exfiltrate data.

Cursor rated it CVSS 5.9 (moderate severity) and shipped the fix in 0.51.0 on May 30, 2025 — turning the feature off by default. Visual Code doesn’t have this restriction because it has no AI agent autonomously writing files.

The fix

Open your Cursor settings (Cmd+, → search for “json”) and add this setting:

{
  "json.schemaDownload.enable": true
}

After saving, open the Command Palette (Cmd+Shift+P) and run JSON: Clear Schema Cache, then reopen your JSON file. You should see validation errors inline.

⚠️ You’re opting back into behaviour that was disabled for a reason. In a trusted personal workspace this is low risk. In a shared or enterprise workspace where Cursor agents have broad file access, think twice before enabling it globally.

Rather than enabling this setting globally, a safer approach is to enable it per project. Instead of adding it to your user settings, add the setting to a .vscode/settings.json file on the project you want the JSON validation to be enabled. Schema download will then only be active in projects you explicitly opt into.

Useful links

34 responses to “How to enable JSON schema validation in Cursor”

  1. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  2. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  3. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  4. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  5. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  6. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  7. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  8. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  9. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  10. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  11. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  12. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  13. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  14. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  15. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  16. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  17. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  18. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  19. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  20. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  21. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  22. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  23. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  24. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  25. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  26. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  27. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  28. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  29. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  30. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  31. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  32. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  33. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

  34. […] you use Cursor for WordPress block development, JuanMa Garrido explains how to enable JSON schema validation in Cursor, which is disabled by default due to a security vulnerability where the AI agent could trigger […]

Leave a Reply

Navigation

About

Writing on the Wall is a newsletter for freelance writers seeking inspiration, advice, and support on their creative journey.

Discover more from JuanMa Codes

Subscribe now to keep reading and get access to the full archive.

Continue reading