Repository navigation
This is a security release that closes three reported account-takeover and authorization issues: an invitation token in the users API that was bound to the inviting administrator instead of the new user, password reset links that were built from the request's Host header and never expired, and an attachment endpoint that let any signed-in user read, delete or add files on assessments they had no access to. It also repairs the reset and invitation flow itself, which had redirected logged-out users to the login page since 1.8.8. Beyond security, assessors can now open, update and finalize any assessment their Access Level covers, the assessment API gains what a full export needs, and DOCX reports keep tables and links intact again. No database migration is required. Deployments that send email should set FACTION_BASE_URL (see Upgrade notes).
🎉 🚀 Upgrades 🎉 🚀
Security fixes
Each item references the GitHub Security Advisory filed against this repository. CVE identifiers are assigned when the advisories are published.
Invitation token bound to the wrong account (GHSA-c6h7-9644-p3pw, high). Reported by Ishbarna. Creating a user through POST /api/users/addUser with verify=true attached the registration token to the administrator making the call, so the invitee who followed the emailed link set the administrator's password. Tokens are now issued only after the new user is saved and are bound to that user, in the API, the admin Users page and the self-service reset.
Reset links from the Host header, tokens that never expired (GHSA-3vm2-w3rc-mcgg, high). Reported by Ishbarna. The reset email took its link from the incoming request, so a forged Host header produced a link to an attacker's domain carrying a valid token, and tokens stayed valid until used. Links are now built from FACTION_BASE_URL, falling back to FACTION_OAUTH_CALLBACK, which SSO deployments already set; the request is used only when neither is configured. Reset tokens expire after one hour and invitations after 72 hours, issuing a new token invalidates the user's earlier ones, and expired tokens are rejected and removed when presented. Tokens created before this release are treated as expiring an hour after they were created.
Attachments readable and writable across assessments (GHSA-gx88-52rh-qhcr, high). Reported by Ishbarna. /service/fileUpload checked only that a session existed. It now resolves every stored file to its assessment or verification and applies the same rules used to open that assessment: assessor, team membership, access level, or the verification's assessor or assigned remediation user. Download, delete and attach return 403 otherwise, and an unknown file id returns 404 instead of an error page. Uploads now record who created them.
Reset and invitation links work again when logged out
Since 1.8.8 the access-control interceptor admitted unauthenticated requests only to the root and /sso namespaces, while the registration page lived under /portal, so every emailed reset or invitation link bounced to the login page. The page now lives at /Register and the emailed links point there.
Assessors can work on any assessment their Access Level covers
1.8.14 let Team Assessments and All Assessments users see more of the queue, but opening an assessment they were not assigned to gave an HTTP 500. The assessment pages now follow the Access Level (Admin > Users), so an assessor can take over work a teammate cannot finish:
- All Assessments (also the default when no level is set) opens and updates every assessment.
- Team Assessments opens and updates the team's assessments.
- Only Assessments Owned by User keeps to the user's own.
This covers the Overview, Vulnerabilities, Notes, Checklists, History, Finalize and Audit tabs: adding, editing, deleting and reassigning vulnerabilities, notes, checklist answers, custom fields, report upload, sending to peer review, accepting the reviewer's edits, and finalizing. Assigned assessors keep access to their own finalized assessments, and finalized assessments stay read-only for everyone. Managers still open any assessment; a manager who also has the assessor role can update the ones their Access Level covers.
An assessment the user may not open now answers 403 Access Denied and is recorded in the audit log, instead of a blank page or a 500. Checklist edits, which previously checked only for the assessor role, now apply the same rule. (#155, #158)
Assessment API: what a full export needs
Reading a whole instance through the API, to migrate it, archive it or feed another system, was not possible. These additions close the gaps. Everything is additive; no existing response loses a field. (#149)
| Method | Path | Purpose |
|---|---|---|
| GET | /assessments/all |
Every assessment the caller can see, using the same scoping as the UI |
| GET | /assessments/report/{aid}?type=docx|pdf&retest=true |
Choose the report format, and reach the retest report. Without type the old behaviour is unchanged |
| GET | /assessments/report/{aid}/info |
Lists which formats a report holds and whether the PDF is password protected (the password is not exposed) |
| GET | /users/all |
The user directory, for resolving user ids on assessments. Admin or manager only; no password hashes or tokens |
Vulnerability payloads now also carry Status, Opened, Closed, DevClosed, StagingClosed, Category and CategoryId. Dates are epoch-millisecond strings, matching the existing Created, and unset fields are left out rather than sent as null. Asking for a report format that does not exist returns 404 rather than substituting another format, and report downloads now carry a real Content-Type.
🐛 Bugfixes 🐛
- Tables and links in a finding came out broken in generated DOCX reports: Word asked to repair the file, tables were flattened into loose lines and links went nowhere or to the wrong address (the pre-compiled report cache kept only paragraphs and lost hyperlink targets). Reported by fransla. (#153, #156)
- Report generation failed with
Illegal group referencewhen the assessment name, an assessor name, the team or the assessment type contained a$and a finding used the matching variable, and a backslash in those values was dropped (the values were inserted as regex replacements). They are now inserted literally. Contributed by bardrop. (#157) - Any finding not attached to an assessment threw an error when read, which also broke
GET /assessments/vulns/{aid}(a nullable id read as a primitive). Assessments with no start or end date no longer fail an API listing. (#149)
🧰 Internal / Test infrastructure
- New tests:
AssessmentEditAccessTestfor the Access Level rules,MigrationExportAPITestfor the export endpoints,DocxTablesAndLinksTestfor tables and links on both the cached and live report paths, and a literal-value case inDocxAssessmentVarsParityTest. EntityUnitTest.testVulnerabilitySectionnow matchesgetSection()returning the stored key with underscores.
Upgrade notes
- Database migration: not required. Existing reset tokens are honoured for an hour after their creation time, then expire.
- Configuration: set
FACTION_BASE_URLto the public address of your instance (for examplehttps://faction.example.com) in any deployment that sends email. IfFACTION_OAUTH_CALLBACKis already set, it is used whenFACTION_BASE_URLis absent. With neither set the link falls back to the request, which this release otherwise removes as a source. - Emailed links now use
/Register?uid=...instead of/portal/Register?uid=.... Links sent before the upgrade expire within the hour in any case. - Access Level: assessors with All Assessments or Team Assessments can now edit and finalize assessments they are not assigned to. Review the Access Level of your assessors under Admin > Users if that is wider than you intend; Only Assessments Owned by User keeps the previous behaviour.
- Reports: the pre-compiled report cache format changed, so cached finding content is rebuilt the next time each finding is used in a report.
- API: all existing endpoints continue to work unchanged.
POST /api/users/addUserbehaves as documented; no request or response changes.
🙏 Thanks
Thank you to @Ishbarna for finding and reporting all three security issues with clear reproduction steps and fix suggestions, and for flagging the reachability problem that turned out to be a regression in its own right. Thank you to @fransla for reporting the broken tables and links in DOCX reports, and to @bardrop for the fix to literal values in reports.
If you find a security issue in FACTION, please report it privately through this repository's Security tab so it can be fixed before details are public.