Skip to content

Large XQuery range can crash eXist-db #1971

@adamretter

Description

@adamretter

The following very simple query from the XQTS 3.1 will result in a java.lang.OutOfMemoryError.

count(subsequence(1 to 3000000000, -2147483649))

It should also be considered as a security issue. This simple query could be sent to the REST end-point of any eXist-db server (which exposes the service), and it will cause the JVM to shutdown.

The XQTS states that we can either return the value 3000000000, or any error code. So we can decide what we want to do here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions