RUSTSEC-2025-0169

Source
https://rustsec.org/advisories/RUSTSEC-2025-0169
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0169.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2025-0169
Published
2025-04-24T12:00:00Z
Modified
2026-08-11T10:30:03.159147552Z
Summary
`FormatContext` stream accessors can cause undefined behavior from safe code
Details

Affected versions of stainless_ffmpeg exposed several safe public methods on FormatContext that accepted a stream_index parameter and used it in unsafe pointer operations without checking whether the index was valid. These methods performed pointer arithmetic and dereferenced the resulting stream pointer. Safe callers could pass a negative or out-of-bounds stream_index, which could cause out-of-bounds pointer access and undefined behavior from safe Rust code.

The issue was fixed in version 0.6.0 by marking the affected stream accessor methods as unsafe and documenting that callers must ensure stream_index is a valid stream index.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / stainless_ffmpeg

Package

Name
stainless_ffmpeg
View open source insights on deps.dev
Purl
pkg:cargo/stainless_ffmpeg

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.6.0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "stainless_ffmpeg::format_context::FormatContext::get_codec_id",
            "stainless_ffmpeg::format_context::FormatContext::get_stream",
            "stainless_ffmpeg::format_context::FormatContext::get_stream_type",
            "stainless_ffmpeg::format_context::FormatContext::get_stream_type_name"
        ],
        "arch": []
    }
}

Database specific

cvss
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0169.json"
categories
[]
informational
"unsound"