Commit ac05d552 shipped in rustypaste v0.18.1 to close CVE-2026-90774, and every dependency scanner watching Cargo.lock flipped the service from red to green.
Twenty lines down src/paste.rs, Paste::store_url still wrote outside its target directory, and util::safe_path_join still evaluated base.starts_with(&base) as true.
Across nine upstream patch audits published in vciy advisories during October 2026, the dominant failure mode was never exotic cryptography. It was geometry: fixing the single HTTP route named in the bug report while leaving its sibling route in the same controller wired straight to the unguarded sink.
A version scanner cannot see that defect by construction. Scanners compare a manifest string (0.18.1 >= 0.18.1) against an advisory feed. They verify that a release tag moved. They never verify that the invariant holds across the module.
When you close a P0 or P1 ticket on an internet-facing service without reading the fix commit, you are trusting that an overworked maintainer under embargo pressure audited every caller in the file rather than just making the reporter's curl command return 400. Often, they did not.
Read the two commits on orhun/rustypaste for CVE-2026-90774 (vciy-2026-0001). Commit ac05d552 (shipped as v0.18.1) updated Paste::store_file to re-derive file_name from path.file_name() after calling util::safe_path_join. Two exploitable seams remained live in v0.18.1 until commit e752139494ac (v0.18.2) closed them.
Seam one sat in src/util.rs:192-199, where the containment guard read if !new_path.starts_with(cleaned_base). In Rust's std::path::Path, starts_with is component-wise and reflexive: /srv/uploads/url starts with /srv/uploads/url. Pass . or a/.. and new_path equals cleaned_base itself, sailing past the guard. Seam two sat twenty lines away in Paste::store_url (src/paste.rs:381-389), which called safe_path_join without re-binding file_name, then called path.set_file_name(format!("{file_name}.{timestamp}")) whenever an expiry header arrived. Because new_path equaled <upload_path>/url, set_file_name replaced the url directory component itself and wrote into <upload_path>/.{timestamp} one level up.
Now inspect OS4ED/openSIS-Classic commit 24bb5303 (PR #482) for CVE-2026-91107 (vciy-2026-0002). In modules/users/Staff.php:33-39, the fix added $user_auth_check = DBGet(DBQuery(...)); if ($_REQUEST['staff_id'] == $user_auth_check). In openSIS, DBGet() returns a 1-indexed 2D PHP array ($user_auth_check[1]['USER_ID']), never a scalar ID. Scalar-to-array comparison evaluates false for every legitimate non-admin user, while SchoolsInfoInc.php:30 wrapped its check in if ($_REQUEST['school_info_id'] != 'new') even though line 449 executed UPDATE login_authentication keyed on UserStaffID(). Meanwhile sibling modules/users/User.php:83 allowed teacher profiles to update login_authentication with zero ownership check. One merged fix PR; three live authorization defects.
The identical sibling pattern appeared around CVE-2026-69115 in open-im-server (vciy-2026-0003), where absent authverify.CheckAdmin() checks clustered across GetPaginationUsers, GetAllUserID, and GetGroups. Point fixes on clustered bugs leave the cluster standing.
Save as verify.rs and run rustc --edition 2021 verify.rs && ./verify. Compiles with Rust std only. Mirrors src/util.rs:192-199 (safe_path_join<P1: AsRef<Path>, P2: AsRef<Path>>) and src/paste.rs:381-389 (Paste::store_url) from rustypaste v0.18.1 (ac05d552) vs v0.18.2 (e752139494ac), asserting both the parent-directory escape and the exact two-line fix.
use std::io::{Error as IoError, ErrorKind, Result as IoResult};
use std::path::{Component, Path, PathBuf};
// Mirrors path_clean::PathClean::clean() used in rustypaste src/util.rs
fn clean_path(path: &Path) -> PathBuf {
let mut out = PathBuf::new();
for comp in path.components() {
match comp {
Component::CurDir => {}
Component::ParentDir => { out.pop(); }
other => out.push(other.as_os_str()),
}
}
out
}
// Mirrors rustypaste v0.18.1 src/util.rs:192-199 (commit ac05d552)
pub fn safe_path_join_v0181<P1: AsRef<Path>, P2: AsRef<Path>>(base: P1, part: P2) -> IoResult<PathBuf> {
let cleaned_base = clean_path(base.as_ref());
let new_path = clean_path(&base.as_ref().join(part));
if !new_path.starts_with(&cleaned_base) {
return Err(IoError::new(ErrorKind::InvalidInput, "path traversal blocked"));
}
Ok(new_path)
}
// Mirrors rustypaste v0.18.2 src/util.rs:192-200 (commit e752139494ac)
pub fn safe_path_join_v0182<P1: AsRef<Path>, P2: AsRef<Path>>(base: P1, part: P2) -> IoResult<PathBuf> {
let cleaned_base = clean_path(base.as_ref());
let new_path = clean_path(&base.as_ref().join(part));
if new_path == cleaned_base || !new_path.starts_with(&cleaned_base) {
return Err(IoError::new(ErrorKind::InvalidInput, "reflexive or traversal path blocked"));
}
Ok(new_path)
}
// Mirrors Paste::store_url in src/paste.rs:381-389
fn store_url_v0181(url_upload_path: &Path, file_name: &str, timestamp: u64) -> IoResult<PathBuf> {
let mut path = safe_path_join_v0181(url_upload_path, file_name)?;
path.set_file_name(format!("{file_name}.{timestamp}"));
Ok(path)
}
fn store_url_v0182(url_upload_path: &Path, file_name: &str, timestamp: u64) -> IoResult<PathBuf> {
let mut path = safe_path_join_v0182(url_upload_path, file_name)?;
let file_name = path.file_name().map(|t| t.to_string_lossy()).unwrap_or_default().into_owned();
path.set_file_name(format!("{file_name}.{timestamp}"));
Ok(path)
}
fn main() {
let url_upload_path = Path::new("/srv/uploads/url");
let escaped = store_url_v0181(url_upload_path, ".", 1795240000).unwrap();
assert_eq!(escaped, Path::new("/srv/uploads/..1795240000"));
assert!(store_url_v0182(url_upload_path, ".", 1795240000).is_err());
assert!(store_url_v0182(url_upload_path, "a/..", 1795240000).is_err());
let valid = store_url_v0182(url_upload_path, "note", 1795240000).unwrap();
assert_eq!(valid, Path::new("/srv/uploads/url/note.1795240000"));
println!("VERIFIED: v0.18.1 wrote {:?} outside {:?}; v0.18.2 blocked", escaped, url_upload_path);
}
// Expected output:
// VERIFIED: v0.18.1 wrote "/srv/uploads/..1795240000" outside "/srv/uploads/url"; v0.18.2 blocked
You do not need to audit 1,400 transitive packages. Run a strict five-minute diff check whenever you close or mitigate a critical vulnerability on an internet-exposed service.
Question one: did the guard land inside the shared sink (safe_path_join, CheckAdmin middleware) or inside a single route handler (store_file)? If it landed in one route handler, git grep every sibling caller of that sink in the same directory before trusting the version bump. Question two: do the types on both sides of the new predicate actually match (new_path != cleaned_base, (int)$staff_id === (int)$row[1]['USER_ID'])? Question three: did the fix commit ship with a negative unit test that fails when the guard line is reverted? Commit 24bb5303 touched zero test files. No negative test, no proof.
When an upstream release fails any of those three checks, block the unpatched sibling routes at your reverse proxy or pin the follow-up commit (v0.18.2), then freeze a mitigated decision record naming the exact commit SHA verified.
Each triplet separates the shortcut a naive rule takes from the mechanism underneath and the call you can defend to an auditor.
Surface signal: Scanner sees rustypaste 0.18.1 (> 0.18.0) in Cargo.lock and marks CVE-2026-90774 resolved.
Actual mechanism: Path::starts_with passed new_path == cleaned_base ('.'), and Paste::store_url called path.set_file_name without re-deriving file_name, escaping <upload_path>/url.
Defensible call: Require rustypaste >= 0.18.2 (commit e752139494ac6a840d5c19488f7afd9a2fa28f60) and reject new_path == cleaned_base in every custom Rust path-join helper.
Surface signal: Upstream merged commit 24bb5303 adding $user_auth_check to Staff.php and SchoolsInfoInc.php.
Actual mechanism: $_REQUEST['staff_id'] == $user_auth_check compared a scalar string to a 2D DBGet() array, SchoolsInfoInc.php skipped the guard when school_info_id == 'new', and User.php allowed teacher updates unguarded.
Defensible call: Block non-admin access to Staff.php, SchoolsInfoInc.php, and User.php at the reverse proxy and record a mitigated VDR citing vciy-2026-0002.
If a CVE patch edits store_file instead of safe_path_join or shared auth middleware, grep every sibling caller in that module before trusting the release.
child.starts_with(base) returns true when child == base. Any subsequent set_file_name or parent() call then writes one directory higher than intended.
Commit 24bb5303 in openSIS shipped with zero regression tests, hiding a scalar-vs-2D-array comparison that could never evaluate true.
Recording v0.18.2 (e752139494ac) instead of 'patched CVE-2026-90774' proves to an auditor that you cleared the sibling bypass too.
Semver tells you a tag moved. Only the diff tells you the hole closed.
Jonathan Corners · Founder, Voxell, Inc. · Referenced records: CVE-2026-90774, CVE-2026-91107, CVE-2026-69115