fs.futimes() Bypasses Read-Only Permission Model
The Node.js permission model fails to enforce write restrictions on the futimes() call, allowing a process with only read permissions to change file access and modification timestamps. An attacker could use this to alter timestamps and obscure activity, reducing the reliability of logs.
- Triaged in 2 days
- Fixed in 3 months
- Disclosed after 3 months
Summary by the program
A flaw in Node.js's permission model allows a file's access and modification timestamps to be changed via futimes() even when the process has only read permissions. Unlike utimes(), futimes() does not apply the expected write-permission checks, which means file metadata can be modified in read-only directories. This behavior could be used to alter timestamps in ways that obscure activity, reducing the reliability of logs. This vulnerability affects users of the permission model on Node.js v20, v22, v24, and v25.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the permission model's write check was applied to utimes() but omitted from the futimes() code path, so the latter bypasses the read-only restriction.
Impact
An attacker with only read permissions could change file timestamps, which may obscure activity and reduce the reliability of logs; the text does not state whether any other defence limits this.
What the attacker needed
Node.js permission model enabled; process has read-only file access
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Node.js has a security feature that lets you restrict what a program can do, such as only reading files and not changing them. This report found that one specific way of changing a file's timestamps slipped past that restriction, so a program that was only supposed to read files could still alter when they appear to have been last accessed or modified. That could make it harder to trust file timestamps when investigating what happened on a system.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.