CVE-2024-27322 is partially fixed in R 4.4.0. But the attack surface is still there. First, this package supports R > 3.6 therefore the partial fix in 4.4.0 is not applied in many supported versions. Second, even with 4.4.0 deserialization of .Rdata and .RDS in some cases can still invoke arbitrary code execution. See this message by gws.
We can't be too nanny but should we rethink the "any R object" policy of .Rdata
|
#' \item Saved R objects (.RData,.rda), using [base::load()] for single-object .Rdata files. Use `which` to specify an object name for multi-object .Rdata files. This can be any R object (not just a data frame). |
.RDS
|
#' \item Serialized R objects (.rds), using [base::readRDS()]. This can be any R object (not just a data frame). |
and qs
|
#' \item Serialized R objects (.qs), using [qs::qread()], which is |
|
#' significantly faster than .rds. This can be any R |
|
#' object (not just a data frame). |
There are several options:
- Warn about non data frame object
- Completely forbid non data frame object
- Only forbid Promise
- Just warn in the doc
- Don't be nanny
CVE-2024-27322 is partially fixed in R 4.4.0. But the attack surface is still there. First, this package supports R > 3.6 therefore the partial fix in 4.4.0 is not applied in many supported versions. Second, even with 4.4.0 deserialization of
.Rdataand.RDSin some cases can still invoke arbitrary code execution. See this message by gws.We can't be too nanny but should we rethink the "any R object" policy of
.Rdatario/R/import.R
Line 31 in c529994
.RDSrio/R/import.R
Line 32 in c529994
and
qsrio/R/import.R
Lines 33 to 35 in c529994
There are several options: