Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

Filelayer

Latest version: v0.37.0

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
MCP server Transport: stdio Publisher: filelayer
0 Stars
0 Forks
16 Versions
TypeScript Repo language

Scan summary

Filelayer was last scanned on 25 Nov 2026 at version 0.37.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 16 versions; the latest 3 were published within 6 days (20–25 Nov 2026).
  • Findings: No rules fired in version 0.37.0.
  • MCP server: Runs over stdio.

Versions

16 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.37.0 LATEST 25 Nov 2026 No rules fired
0.36.1 24 Nov 2026 No rules fired
0.36.0 20 Nov 2026 No rules fired
0.35.4 15 Nov 2026 Not shown
0.35.3 13 Nov 2026 Not shown

No rules fired in 0.37.0

Findings

Findings for v0.37.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.37.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Filelayer

CI npm node license

Per-file permissions, links you can take back, and an audit trail of every allowed and denied access, for the files your users upload. A Node library on your own Postgres and your own S3 or R2 bucket.

A first file in an organization, and a refusal, in fourteen lines:

npm install @filelayer/core
npm install --save-dev "@electric-sql/pglite@^0.3.11"

The command pins PGlite's 0.3 line; 0.5 and 0.6 work too, and the await fl.close() at the end of the block lets the process exit at once with any of them.

import { Filelayer } from '@filelayer/core';
const fl = await Filelayer.quickstart({ baseUrl: 'http://localhost:3000' });

await fl.orgs.create('acme', { owner: 'alice' });                // a tenant and its owner
await fl.orgs.setRole('acme', 'bob', 'member', { as: 'alice' });  // a member of it
await fl.orgs.create('globex', { owner: 'eve' });                 // another tenant

const { id } = await fl.files.put(new TextEncoder().encode('Q3 plan'), {
  org: 'acme', owner: 'alice', visibility: 'org', name: 'q3.txt',
});

const { body } = await fl.files.get(id, { as: 'bob' });           // a member of acme: allowed
console.log(new TextDecoder().decode(body));                      // 'Q3 plan'
await fl.files.get(id, { as: 'eve' }).catch((e) => console.log(e.status, e.code)); // 404 not_found

const [refusal] = await fl.orgs.audit('acme', { as: 'alice', decision: 'deny' }); // oldest first
console.log(refusal.summary);   // '<time> eve file.read deny:no_membership q3.txt @acme'

await fl.close();                                                 // lets the process exit at once

To run it: in an empty directory, npm init -y, the two installs above, save the block as first.mjs, then node first.mjs. No account, no credential and no dashboard: quickstart() runs Postgres in process. The refusal is a 404, so a stranger cannot tell the file exists, and the reason is in the audit trail, not in the response.

Or try it with nothing to install: a demo in the browser uploads a file, is refused from another organization, revokes a share link and shows the audit trail that recorded both refusals.

The file layer for SaaS applications. A customer's security review asks who opened a file and who was refused. A link you sent has to stop working now. Someone asks to be erased from your logs. Filelayer answers all three for the files your users upload: per-file permissions, links you can take back, and an audit trail of every allowed and denied access, on your own Postgres. → filelayer.dev

One file feature, built five ways and attacked the same way. The same document workspace was built with Filelayer, Supabase Storage with row-level security, raw S3 presigned URLs, Convex and Vercel Blob, and every version that runs was attacked by one shared suite:

  • About 3.1 times as many kinds of security-sensitive decision in the two alternatives that ran, places where a wrong choice leaks data and nothing reports it: 25 for Supabase and 24 for raw S3, against Filelayer's 8, and about 4.0 times as many places to get them right.
  • 21 of 21 for Filelayer on the 21 attacks every executed version can express, after the executed alternatives were revised against the suite (raw S3 in one round, Supabase in two rounds), with every diff published. Raw S3 also defends 21 of 21; Supabase defends 21 of 21. The hand-written versions can be made safe; the difference is how much code that takes.
  • About 2.9 times as many lines in the two alternatives that ran, wired as in production: 569 lines of application and infrastructure code for Supabase and 794 for raw S3, against Filelayer's 233, with its pool, bucket and policies. Against our example as it ships, 157 lines, it is about 4.1 times as many. Convex and Vercel Blob were neither executed nor compiled, so they are left out of every figure.

The results, the method and where each alternative is better: filelayer.dev/one-feature-five-ways. Everything reruns from a clone with node benchmark/run.mjs.

You tell Filelayer who the caller is. Filelayer decides what they may do with a file, serves the bytes with the right headers, and writes the audit event. For file access that goes through Filelayer, that decision is made in one place, packages/core/src/authz.ts, so you write no ownership checks in route handlers, no presigned-URL expiry logic, and no per-route access rules of your own.

Built to be adopted without us. The quickstart, the guides, the examples and llms.txt are written so that you, or your coding agent, can integrate it alone. Where it breaks, open an issue. Free and open source, with no usage limits. You pay for support and reviews, see pricing. The core library is and will remain Apache-2.0. Alpha, and the numbers behind that word are all on one page: should you depend on this? · what it does not do · roadmap to 1.0

// Public avatar
const { url } = await fl.files.put(bytes, { public: true });

// Private, user-owned
const { id } = await fl.files.put(bytes, { owner: 'user_123' });
const file  = await fl.files.get(id, { as: 'user_123' });

// Multi-tenant, role-controlled: create the org once, then upload into it
await fl.orgs.create('acme', { owner: 'user_123' });
await fl.files.put(bytes, { org: 'acme', owner: 'user_123' });

// Shared with an expiry, a password and a download cap, and revocable
const share = await fl.shares.create(id, {
  as: 'user_123', expiresIn: 3600, maxDownloads: 3, password: 'hunter2',
});
await fl.shares.revoke(share.grantId, { as: 'user_123' });   // this link, now

// Shared with a named user, and taken back. `unshare` is the one you want for
// a person: `create()` is not idempotent, so revoking a single grant id you
// happen to be holding can leave an earlier one live.
await fl.shares.create(id, { as: 'user_123', withUser: 'user_456' });
await fl.shares.unshare(id, { as: 'user_123', user: 'user_456' });   // all of it

Start at whichever line matches your problem. Complexity is incremental: each tier adds one concept, and no tier makes you pay for a concept you are not using. → docs/QUICKSTART.md


The three layers

your application          fl.files.put / get / list, fl.shares, fl.orgs
                          you pass YOUR user id; nothing here knows a uuid
   ───────────────────────────────────────────────────────────────────────
Filelayer                 ONE authorization function answers every request
                          grants, roles, expiry, download caps, revocation
                          the audit event, written in the decision's own
                          transaction so the log cannot disagree with it
   ───────────────────────────────────────────────────────────────────────
your Postgres             13 tables: 9 for tenants, files, permissions,
your bucket               shares, the audit chain and job runs, and 4 for
                          the schema version and the usage report.
                          Filelayer owns the schema, you own the database.
                          Bytes go to S3, R2, B2 or a directory behind one
                          adapter; storage is replaceable

Filelayer sits between the two things you already run. It brings no database and no storage of its own, and zero runtime dependencies.

It is authorization middleware, not row-level security. It decides for calls made through it, in your process. The schema additionally refuses cross-tenant grants, cross-project identities and delegation that amplifies authority from every writer that connects as an ordinary role, a psql session included; those are constraints and triggers. A superuser, or a role granted SET on session_replication_role, can switch triggers and foreign-key checks off for its own session, and the table's owner can disable a trigger with ALTER TABLE. In the documented install, which applies schema.sql with the application's own DATABASE_URL, the application's role is that owner. But there is no RLS policy in schema.sql, and a direct SELECT against these tables is filtered by nothing. Filelayer composes with database-level enforcement; it does not replace it.


What it is for, and what it is not for

Worth the overhead when: files are private, belong to specific people or tenants, and their permissions change over time. Documents, contracts, attachments, exports, anything with a share link you might later want back.

Not worth the overhead when:

You need Use instead Why
Public images at CDN volume a CDN-backed bucket Default delivery proxies every byte. Redirect delivery (below) removes the proxy but is opt-in and narrow.
Video or audio at scale a CDN / media service Seeking works: the shipped routes answer Range with 206. But default delivery proxies every byte through your server, and there is no CDN on that path.
Browser → storage upload with your server out of the data path, in development a real bucket FsStorage mints the credential so the client code is identical, but it receives the bytes itself and says so: via: 'server'. Only S3 and R2 keep your process out of the path.
Resumable or multipart direct upload presigned S3 directly / tus One signed PUT, one object. There is no resume.
Thumbnails, transforms, format negotiation Cloudinary / imgix We have none.
Against the two things you would otherwise do
Hand-rolled presigned URLs Supabase Storage Filelayer
Revoke a link somebody already holds No. A signature is valid until its clock runs out; your options are a short TTL or proxying the bytes yourself No. Signed URLs are signed with an internal key and cannot be revoked Yes, on the next request, transitively through the delegation chain
"Everyone in this org may read" your own join, recomputed on every join and leave expressible as an RLS policy one grant row; membership resolves at request time
Who accessed this, including refusals whatever you wrote not a product feature; Postgres logging is not an access log hash-chained per tenant, written in the decision's transaction
Download cap your own counter, and the race in it none atomic, reserved before the bytes move
CDN on the private path yes, and that is why you cannot revoke yes, same trade no: the two facts are the same fact
Public images at volume yes yes no. Use a bucket behind a CDN
Lines for a public avatar ~10 10 16

The last two rows are losses and they are not close. We publish the full comparison, including every case we lose, in ARCHITECTURE-PROGRESSIVE.md §5. Short version: for a public avatar, Supabase is 10 lines and Filelayer is 16. If avatars are your whole problem, use Supabase.


The five security properties

These are the product. Each is enforced in the schema or the authorization engine, not by convention, and each has tests named after it.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • MCP Registry dev.filelayer/core

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229