# Private objects exposed through project import

GitLab project import blocked top-level `_ids` fields but not nested ones inside `attributes`, letting an attacker link arbitrary private issues by ID and read other users' data.

- Payout: $20,000
- Severity: critical
- Program: GitLab
- Found by: saltyyolk
- Disclosed: 2022-06-07
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/767770
- Library page: https://bugbountylibrary.com/r/h1%3A767770
- Tags: area:web domain:web impact:data-leak impact:pii-leak kind:bounty platform:hackerone sev:critical tech:ruby technique:chained technique:incomplete-fix vuln:access-control vuln:idor

**Target:** GitLab project import (project.json attributes)
**Root cause:** The fix for the prior IDOR only filtered top-level `*_ids` keys in the imported project.json, but relation IDs like `issue_ids` could still be set nested inside the `attributes` object, which was not sanitized.
**Steps:**
1. Craft a project.json with an `attributes` object containing `"issue_ids": [29279725]` and a description.
2. Package it into an import tarball.
3. Import the tarball into GitLab.
4. Open the Issues tab; the referenced private issue from another project/user is now linked and readable.
**How found:** Researcher reviewed the patch for report 743953 that blocked `_ids` attributes, noticed the filter only applied at the top level, and hypothesized nested `attributes.issue_ids` would bypass it—confirmed by importing a crafted tarball.
**Exploitation:** Attacker builds a malicious import archive whose project.json nests `issue_ids` under `attributes`, imports it, and the importer creates relations to arbitrary issue IDs. By traversing the incremental ID space the attacker links and reads private issues belonging to other users.
**Escalation:** Enumerate the incremental ID space to harvest many private objects across tenants, turning a single link into broad data exposure.
**Insight:** When a fix blacklists keys like `*_ids`, check whether the same keys can be smuggled through nested objects (e.g. `attributes`) that the sanitizer doesn't recurse into; importers that accept arbitrary JSON are prime targets for filter-bypass via nesting.

## Proof of concept (copied exactly from the original report)

**project.json with issue_ids in attributes**

```
"attributes": {
        "issue_ids": [ 29279725 ],
        "description": "Set from attributes[description]"
    },
```

