Skip to content

api(repos): Unbounded aggregate allocation in federated repository response #427

Closed

Description

@euxarist

Summary

The anonymous endpoint GET /api/v1/repos/federated deserializes each reachable peer response into Vec<serde_json::Value> and accumulates rows without byte, row, or aggregate limits (crates/gitlawb-node/src/api/repos.rs:2945-2990).

Impact

A peer returning oversized JSON arrays causes unbounded heap retention and serialization work.

Remediation

  1. Bound peer HTTP response bytes.
  2. Cap rows per peer and aggregate total.
  3. Deserialize bounded typed DTOs.

Activity

  1. added
    crate:node
    kind:security
    sev:high
    subsystem:api
    subsystem:peers
    sev:medium
    and removed
    sev:high
    on Sep 10, 2026
  2. beardthelion commented on Sep 10, 2026

    @beardthelion
    Collaborator

    Partial overlap with #418: the unbounded peer read here is the api/repos.rs:2961 site already listed there. This issue adds the aggregate angle (per-peer row cap, total cap, typed DTOs) that a bounded body read alone does not cover, so keeping it open alongside #418. Retagged sev:medium to match the anonymous resource-exhaustion class (#164, #166, #263, #418); the fanout is an amplifier, not a new class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate:nodekind:securitysev:mediumsubsystem:apisubsystem:peers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions