Skip to content

Security: Missing input validation in read_store function#5358

Open
tomaioo wants to merge 1 commit into
gwastro:masterfrom
tomaioo:fix/security/missing-input-validation-in-read-store-f
Open

Security: Missing input validation in read_store function#5358
tomaioo wants to merge 1 commit into
gwastro:masterfrom
tomaioo:fix/security/missing-input-validation-in-read-store-f

Conversation

@tomaioo

@tomaioo tomaioo commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Security: Missing input validation in read_store function

Problem

Severity: Low | File: pycbc/frame/store.py:L56

The read_store function in pycbc/frame/store.py reads from an file using HFile but does not validate that start_time and `end_time consistent with the file's actual data ranges before performing array slicing. While there are some checks, the function could be more robust against malformed inputs.

Solution

Add explicit bounds checking for start_time and end_time parameters, and validate that the computed start and end indices are within array bounds before slicing.

Changes

  • pycbc/frame/store.py (modified)

The `read_store` function in `pycbc/frame/store.py` reads from an file using `HFile` but does not validate that `start_time` and `end_time consistent with the file's actual data ranges before performing array slicing. While there are some checks, the function could be more robust against malformed inputs.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant