Security fixes go into the newest release. Please update before reporting, and check whether the problem is still there.
| Version | Supported |
|---|---|
| 0.14.x (in development, not yet released) | Yes |
| 0.13.x (never published on its own; carried by 0.14.0) | No |
| Anything older | No |
Do not open a public issue for a security problem. Use GitHub's private reporting instead: on the repository's Security tab, choose Report a vulnerability. Include what you found, the steps to reproduce it, the version and platform, and what an attacker could do with it.
You can expect an acknowledgement within a week. We will keep you informed while it is fixed and credit you in the release notes, unless you would rather not be named.
FormChem runs on your own machine, so the things that matter most are the ways something outside it could get in:
- The engine binds to loopback (127.0.0.1). Anything that makes it reachable from another machine without the person turning that on.
- The terminal dock: a terminal is code execution, so only the FormChem window may open, resize, restart or close one. Anything that lets another page, another origin or another program use a terminal session counts.
- Extensions: code from an extension escaping its sandboxed frame, reaching the network, or reading or changing a document without the permission shown.
- Agents and the engine's settings: an outside agent, which includes the app's
own command line (
./formchem cli), changing a document without the person's answer in the FormChem window. Only the window can change the agent choice, and the engine seals that saved value with a key in the system keychain, so a change made outside the window puts the choice back to asking. Anything that lets another program change it without the window counts. - The agent token (from 0.8.0): the MCP endpoint over HTTP answers only
requests that carry
Authorization: Bearer <token>, the token of one of FormChem's own agent tabs, or the window key; everything else gets 401. The token is one line inagent-tokenin the data folder (~/formchem, orFORMCHEM_DATA_DIR), created with owner-only permissions, compared in constant time, and written by./formchem agents installinto the agent configs. Treat it like a password: the.mcp.jsonfiles that install writes hold it, so keep them out of version control, and delete the file and restart the engine to change it. The engine still listens on loopback only, so the token protects against other programs and other users on the same machine, not against the network. Anything that lets a request without the token reach a tool, or that leaks the token to a page, an extension or another user, counts. - Agent edits, Stop and the call log (from 0.8.0): agents change drawings
only through the consent question above, one undo step per call. Agent
tools never write over an existing file and never close a drawing with
unsaved changes. Stop in the title bar refuses every further call of that
agent and withdraws Always allow; only the FormChem window (it holds the
window key) can stop, allow again, undo an agent call from Agent Activity or
read the token. Every call is logged in memory and in
Agent login the data folder, with secret-looking arguments shown as(hidden); the log does hold SMILES, file paths and tool names. Anything that lets an agent act after Stop, undo or change someone else's work through the call log, or skip the log, counts. - Databases and notebook entries (from 0.11.0): records, field values,
files and notebook entries are private data, so every database route, reads
included, needs the window key; agents reach databases only through the MCP
tools, behind the agent token. Thumbnails and
attachments, which the window loads through image and link tags that
cannot send a header, also take a separate view key in the query; it is
random per engine start, opens only those two picture routes, and the
window key itself never goes into a URL or a log. Agents' database writes
ask the person like drawing changes do and are recorded under the agent's
name in the database's audit table. A browser window's uploads and one-time
downloads stay in the Databases folder and are deleted after a day (a
download as soon as it is sent), and only an
.fcdbthat was just uploaded can be adopted into that folder. Anything that lets a request without the window key (or an MCP call without the agent token) read records or entries, lets the view key open any other route, or lets an upload, download or adopted file reach a path outside the Databases folder, counts. A notebook signature is a SHA-256 hash of the entry's content with a name and time, recorded by FormChem; it is not a cryptographic signature tied to a person's key. - The structure library and the agent token's one write path (from
0.12.0): the shared library is the folder
Libraryin the data folder, readable by any program running as the person, by design, so that sibling Form apps can read it; it holds pictures, molfiles and SMILES, nothing else. Its routes (/api/structuresand the paths under it) take the window key or the agent token, reads included, so that./formchem edit-liveand sibling apps can ask FormChem to open a structure. That is the only place outside/mcpwhere the agent token may change anything; every other changing route still needs the window key. The item picture route is the exception that takes no key, because an image tag cannot send one, and like every route it answers local origins only. Anything that lets the agent token write outside/api/structures, or lets a library write leave theLibraryfolder, counts. - The
formai://link (from 0.12.0): the desktop app registers theformaischeme. Aformai://formchem/edit?id=...&from=...link can only ask the running FormChem to open a library item, which it already has, as a live drawing in the main window; thefromname is shown in the title bar after it is cleaned to letters, digits, spaces, dots and dashes. A link cannot open a file path, run a command, change a setting or save anything, and otherformaihosts are passed on, not acted on. Anything that lets a link do more counts. - xtb and CREST (from 0.12.0): FormChem never ships or downloads them. It runs the program at the path the person set in Preferences > 3D, or the one it finds on PATH or in the usual install folders, as a separate process with its own temporary folder, and only after the person asks for a calculation (or allows an agent's). The path is a setting only the window key can change. A program put at that path or on PATH by someone else runs as the person, as any program on PATH would; that is outside what FormChem can guard. Anything that makes FormChem run a program the person did not choose, pass it arguments other than its own, or leave its process running after a cancel, a time limit or the engine's exit, counts.
- Files handed over by the system (from 0.13.0): the desktop app opens a
file you double-click, open with FormChem or send to it while it runs, by
the same path as File > Open: only the extensions File > Open accepts, as
an absolute path, read and never written until you save. The window reads
these files only inside the desktop app; in a browser tab an
?open=link is ignored, so a web page cannot make FormChem open a local file. Anything that lets a handed-over file run code, or a page open a local file, counts. - Demos (from 0.13.0): Home's demos are drawings shipped inside the engine.
Listing them and their previews needs no key, like the item pictures, and
answers local origins only; opening one needs the window key and makes a
new unsaved copy, so the shipped files are never written. The browser demos
under
demos/run with no engine and make no network request of their own (the download link is an ordinary link you click). - Structures by PDB id (from 0.14.0): 3D > Open from PDB by ID... and the
fetch_pdbagent tool are the only parts of FormChem that reach the network on their own. They send a four-character identifier, checked before anything is sent, to files.rcsb.org and nothing else; the route refuses (428) unless the request says the person agreed, the window asks every time, and an agent's call asks like any other change. The answer is read by FormChem's own PDB and mmCIF readers, as a file opened from disk is. Anything that sends more than the identifier, reaches another host, or downloads without the person agreeing counts. - The abbreviation library and style files (from 0.14.0): Define
Abbreviation and the
abbreviation_defineandabbreviation_removetools write onlyabbreviations.jsonin the data folder, atomically, behind the window key (and the agent consent prompt); built-in entries cannot be removed, and a file whose rows all fail to read is never overwritten. Imported.fcstylefiles are data: numbers are checked to 0 to 1000 and fonts against the known list before anything is stored. - Undo history in a file and agent undo (from 0.14.0): a saved undo journal is written only when the person turns Save Undo History with the File on, up to 20 MB, and on open it is checked by applying it to a copy first; a journal that does not apply cleanly is dropped. Undo Agent Changes only ever undoes, one ordinary step at a time, so Redo brings everything back. Anything that lets a crafted journal change a drawing on open, or an agent undo the person's work without it being counted and shown, counts.
- Files: opening or importing documents, structure files, media or archives in a way that writes outside where it should.
Bugs that need someone to already control your machine, or to run a modified build of FormChem, are ordinary bugs: please open an issue for those.