JetBrains .idea project directory

  • PCI 3.2-6.5.1
  • CWE 200
  • CAPEC 152
  • OWASP 2017-A6
  • WASC 33
  • CWE 425
  • WASC 34

Exposed JetBrains .idea project directories occur when the .idea folder from JetBrains IDEs (e.g., IntelliJ IDEA, PhpStorm) is deployed to a web-accessible location. The .idea directory contains project-specific configuration files, including workspace settings, run configurations, module structures, and sometimes sensitive data such as database connection strings or API keys. Public access to this directory can assist attackers in gathering intelligence about the application, its structure, or potential security weaknesses.

Common patterns leading to .idea exposure:

  • Uploading development directories including .idea to the web server.
  • Deploying source code repositories without removing IDE metadata.
  • Misconfigured web servers serving hidden directories by default.
  • Lack of automated deployment checks to exclude IDE or system-specific files.

Impacts:

  • Information Disclosure: Reveals project structure, module configurations, and potentially sensitive credentials.
  • Facilitates Reconnaissance: Attackers can map application architecture and identify resources for targeted attacks.
  • Increased Attack Surface: Knowledge gained may lead to exploitation of configuration errors or insecure endpoints.
  • Intellectual Property Exposure: Sensitive internal project data may be leaked.

Detection indicators:

  • Direct access to .idea directories in web root (e.g., https://example.com/.idea/).
  • Presence of .xml or .iml files in publicly accessible locations.
  • Security scans detecting IDE-specific directories or files.
Remediation

Mitigation strategies focus on preventing exposure and securing deployments:

  1. Exclude .idea from Deployment
    Ensure .idea and other IDE-specific folders are not uploaded to production environments.

  2. Use .gitignore or Equivalent
    Prevent version control from including .idea directories in shared repositories.

  3. Restrict Access via Web Server
    Block access to any project metadata directories if accidentally deployed.

  4. Review Deployment Pipelines
    Implement automated checks to remove IDE-specific files before production deployment.

  5. Sanitize Project Configuration Files
    Avoid storing sensitive information such as credentials or keys in .idea files.

  6. Monitor and Audit Public Directories
    Regularly check for accidentally exposed IDE directories or metadata.

  7. Security Testing
    Include detection of .idea and other IDE/project metadata in penetration testing and automated scans.

References