gitlab-ci-yml: GitLab CI YAML - Exposure

2025-08-01 GitLab CI YAML PoC Public

Description

The gitlab-ci.yml file, used for configuring CI/CD pipelines in GitLab, has been found exposed. This file contains crucial details about the build, test, and deployment processes, and may include sensitive information such as API keys, tokens, environment variables, and other credentials.

PoC

id: gitlab-ci-yml

info:
  name: GitLab CI YAML - Exposure
  author: DhiyaneshDK
  severity: medium
  description: |
    The gitlab-ci.yml file, used for configuring CI/CD pipelines in GitLab, has been found exposed. This file contains crucial details about the build, test, and deployment processes, and may include sensitive information such as API keys, tokens, environment variables, and other credentials.
  impact: |
    Unauthorized access to this file can lead to severe security risks and operational disruptions.
  reference:
    - https://x.com/RootMoksha/status/1816571625388818923/photo/1
  classification:
    cpe: cpe:2.3:a:gitlab:gitlab:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: gitlab
    product: gitlab
    shodan-query: html:"gitlab-ci.yml"
  tags: exposure,config,cicd,gitlab,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.gitlab-ci.yml"
      - "{{BaseURL}}/gitlab-ci.yml"
      - "{{BaseURL}}/.gitlab-ci/variables.yml"

    stop-at-first-match: true

    matchers-condition: or
    matchers:
      - type: word
        part: body
        words:
          - "variables:"
          - "before_script:"
        condition: and

      - type: word
        part: body
        words:
          - "stage: build"
          - "script:"
          - "image:"
        condition: and

      - type: word
        part: body
        words:
          - "variables:"
          - "releasePath:"
          - "sshUser:"
        condition: and
# digest: 4a0a00473045022100c877bd4fb88365607b2966eb9742a2aac22dff1a851dab47090c4c7c31be4edd02207d445bfa36816c2fb91dd975b72cf9cf14d5887a5ee20576b14c0604cb3d0f1c:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities