Skip to content

Variant parsing is vulnerable to memory-DoS and malformed-input crashes #16455

Open

Description

@rdblue

This issue was reported to the private Apache Iceberg security mailing list. The submitter is being kept anonymous because the report was sent to a private list. After review, the issue is not considered a serious vulnerability that needs to be kept private, so it is being filed publicly here for tracking and resolution.

Note: this submission was generated by AI. Please review its claims and source references carefully before acting on them.

Summary

Malformed variant buffers can force large allocations and raw JVM
exceptions before structural validation, turning small
attacker-controlled payloads into a read-time denial of service path.

Affected Maven coordinates

  • primary shipped client artifact: org.apache.iceberg:iceberg-api

Attacker prerequisites

  • Any consumer that parses variant values from untrusted or
    semi-trusted Iceberg content is exposed.
  • The easiest attack is a tiny payload that advertises a very large
    element count or dictionary size.

Impact

  • A malicious variant payload can force large allocations before the
    payload is structurally validated.
  • The same code path can also fail with raw JVM exceptions such as
    NegativeArraySizeException, ArrayIndexOutOfBoundsException, and
    IndexOutOfBoundsException instead of a typed validation failure.
  • In a service that reads attacker-controlled tables or records, this
    is a straightforward availability issue.

Proof status

Source review only. The issue is visible directly from source.

Key source references

  • org.apache.iceberg.variants.Variant
  • org.apache.iceberg.variants.VariantValue
  • org.apache.iceberg.variants.SerializedMetadata
  • org.apache.iceberg.variants.SerializedArray
  • org.apache.iceberg.variants.SerializedObject

Activity

  1. nssalian commented on May 20, 2026

    @nssalian
    Collaborator

    I'd like to work on this.
    @rdblue do you mind assigning this to me?

  2. rdblue commented on May 20, 2026

    @rdblue
    ContributorAuthor

    @nssalian, thanks for looking into this!

    In the Iceberg project, we don't assign issues to people. That tends to prevent them from moving forward more than it deduplicates effort. It's rare that two people decide to work on the same issue and assigning issues to just one person signals that no one else should work on it. That's not great when contributors, understandably, end up not having as much time as they originally thought. So we leave issues unassigned and rely on people to communicate about how to get them done. Just stepping up to work on it should be fine. Thank you!

  3. nssalian commented on May 20, 2026

    @nssalian
    Collaborator

    Appreciate it. I'll put up a fix for this.
    @steveloughran has an open item in Parquet for malformed metadata too: apache/parquet-java#3562 and in iceberg as well #16335

  4. rdblue commented on May 20, 2026

    @rdblue
    ContributorAuthor

    I'm removing the security label from this. It is more of a potential bug than a security issue.

  5. RussellSpitzer commented on May 21, 2026

    @RussellSpitzer
    Member

    Agreed, not a security issue because it's an OOM and also because a legitimate payload could also cause an OOM but worth hardening.

  6. nssalian commented on May 21, 2026

    @nssalian
    Collaborator

    Makes sense to keep this as a bug. I'll work with @steveloughran to see how to add the fixes.

  7. steveloughran commented on May 21, 2026

    @steveloughran
    Contributor

    the only marginal security issue is that OOM on multiplication overflow could affect other workers; the others are just "bad data fails differently from expected", and the checks just bring faliure forward. parquet C++ probably needs the most auditing here, as parquet rs hasgreat validation in.

    @rdblue see also (and please help review!)

    One purely subjective issue (as raised on parquet dev list) is what is a good depth limit? I went with 500 to match that of the json parser.

  8. github-actions commented on Nov 18, 2026

    @github-actions

    This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions