Changelog ========= v2.5.50 (2026-10-09) -------------------- New ~~~ - [feed] Add phishunt.io active phishing URLs feed. [Daniel López] - [Overmind] Complete rework of Server Settings UI. [ThomasLcr] - [Overmind] Display small warning icon next to attribute matching a warninglist. [ThomasLcr] - [Overmind] data attribute for label field_hint. [ThomasLcr] - [Overmind] Sharing group specific badge. [ThomasLcr] - [Overmind] User settings are available from profile page. [ThomasLcr] - [decayingModel:view] Edit the attribute type mapping as raw JSON. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [Overmind] Add type & connector tag Fields in Galaxie view. [ThomasLcr] - [Overmind] Thumbnail for images in attribute index. [ThomasLcr] - [Overmind] Add download pdf inside quick action in event_report/view. [ThomasLcr] - [Overmind] Workflow views. [ThomasLcr] - [Overmind] Mass actions for attributes index in event view. [ThomasLcr] - [Overmind] Display object references/relationships in the index and add form. [ThomasLcr] - [Overmind] New date field component. [ThomasLcr] - [Overmind] Added taxonomies filtering in the add/edit tag modal. [ThomasLcr] - [Overmind] Implemented benchmark for site admin. [ThomasLcr] - [statistics] Add object relation usage statistics. [Claude Opus 5.5, iglocska] Statistics objectRelationUsage prints, per object template, the relations of the latest template version that are in use, ordered by the number of objects populating them (ties broken by attribute count, then name). Objects of every template version count towards the latest one. They are matched by template UUID, case-insensitively, so renamed templates are included. Deleted objects and attributes are ignored, and relations that the latest version no longer has are left out. Objects are processed in id-range chunks so that memory and per-query work stay bounded on large instances. The JSON goes to stdout, progress to stderr. Changes ~~~~~~~ - [schema] updated. [iglocska] - [VERSION] bump. [iglocska] - [misp-objects] updated. [Alexandre Dulaunoy] - [misp-objects] updated to the latest version. [Alexandre Dulaunoy] - [misp-objects] updated to the latest version. [Alexandre Dulaunoy] - [warning-lists] updated to the latest version. [Alexandre Dulaunoy] - [misp-galaxy] updated to the latest version. [Alexandre Dulaunoy] - [Overmind] Improved debug mode topbar. [ThomasLcr] - [Overmind] Improved style with animations. [ThomasLcr] - [Overmind] Rearranged attributes dropdown actions. [ThomasLcr] - [Overmind] Improved Usersettings index & Add/edit Modal. [ThomasLcr] - [Overmind] Placeholders for event index filters. [ThomasLcr] - [Overmind] Replaced icon for Download as modal. [ThomasLcr] - [threads] Replace event discussions with analyst data notes. [Claude Opus 5.5 (1M context), Sami Mokaddem] Remove the Thread and Post models, their controllers and views, the event view discussion box, the event index post count column, the discussion menus, settings, ACL entries, the new-post email job, the post-after-save workflow trigger and the conversation ZMQ topic. A migration turns every post into a note on the thread's event, or on the organisation that started a general discussion; replies become notes on the note they answer. Notes keep the author's organisation as creator, the post's dates and the event's visibility, capped at this community. Posts whose event or organisation is gone and workflows on the removed trigger are logged, then both tables are dropped. - [templates] Replace the legacy templates with event templates. [Claude Opus 5.5, iglocska] Remove the legacy Templates and TemplateElements controllers, their six models, their views in every theme, menu entries, ACL and the code only they used: the attribute population helpers, /tags/viewTag and the template helpers in misp.js and mispOvermind.js. Populating an existing event from a template goes with them; event templates create new events instead. A migration converts every legacy template an organisation authored into an active event template, skipping the MISP-shipped seed set the event template library supersedes. A template it cannot save, or whose name is taken, has its converted definition logged instead, so the upgrade is never held back and nothing is lost. It then drops the legacy tables, and replaces the migrateOldTemplates admin command. perm_template stays, event templates use it. - [allowedlist] Replace the signature allowedlist with a warninglist. [Claude Opus 5.5 (1M context), Sami Mokaddem] Remove the Allowedlist model, controller, views, menu entries, ACL and routes. A migration copies its entries into an enabled custom regex warninglist matching all attribute types, logs entries it could not carry over, then drops the allowedlist table. Matching values are no longer stripped unconditionally from restSearch, TAXII push, OpenIOC and Bro exports; they are flagged as warninglist hits and left out only when enforceWarninglist is set. - [taxonomies:view] Remove the attribute types block copied from warninglists. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [Overmind] Redirect to users/view after editing an user. [ThomasLcr] - [Overmind] Rework User and Organisation View. [ThomasLcr] - [Overmind] Improved Object display and Object filtering. [ThomasLcr] - [Overmind] Improved Attributes index filter and minors fixes. [ThomasLcr] - [Overmind] Improved Add Object form. [ThomasLcr] - [Overmind] Improved event info display in the index. [ThomasLcr] - [Overmind] Link event content cell into tab attribute/object. [ThomasLcr] - [Overmind] Switched position for event report AI actions in the filter bar. [ThomasLcr] - [Overmind] Improved add/edit form for objects. [ThomasLcr] - [Overmind] Improved Benchmark UI. [ThomasLcr] - [Overmind] Improved Users admin_edit/edit form. [ThomasLcr] Fix ~~~ - [zmq] Status check handles phpredis 5 blPop timeouts. [Claude Opus 5.5, iglocska] - phpredis 5 returns an empty array from blPop on timeout rather than null, so the status check read a missing index and raised an undefined array key warning on the diagnostics page when the ZMQ script was not running - [UI:events index] correctly set index filter when trashing is_extension or is_extended filter. [Jeroen Pinoy] - [event graph] handle numeric IDs and absent edge comments. [James Garratt] Only inspect string node IDs for the rootNode prefix when clustering. Numeric attribute IDs must retain their type without causing a JavaScript exception. Render an empty tooltip for relations without a comment. Generic pivot responses omit this optional property; existing comments remain HTML escaped. - [TAXII] repair connection discovery and editing. [James Garratt] Encode Basic credentials for form discovery before beforeSave runs, retain saved-key and Bearer authentication, normalise URL separators and handle an omitted skip_proxy option. Recognise integer and string authentication-error status codes. Handle discovery error responses without another JavaScript exception and escape displayed messages. Seed API-root and collection dropdowns from saved or submitted data so editing a connection preserves its selections without another discovery request. - [ci] Run the object search ACL regression with themes enabled. [Claude Opus 5.5, iglocska] - the skip probe ran as a site admin, who passes the theming_enabled ACL check regardless of the setting, so the class never skipped and the non-admin users hit a 403; the class now reads MISP.enable_themes directly - CI enables MISP.enable_themes so the regression actually runs instead of skipping - [security] Object search matches only the attributes an object shows. [Claude Opus 5.5, iglocska] - the event view's object search found the objects holding a matching attribute without the attribute ACL or the deleted scope, so whether an object came back told the user what its organisation-only, sharing-group or soft-deleted attributes held; it now searches only the attributes the object shows - found while reworking the object search for the attribute value table - [cli] Event reportValidationIssuesAttributes reaches the attribute model. [Claude Opus 5.5, iglocska] - Same defect as normalizeIpAddress: $this->Event->MispAttribute is null since the MispAttribute rename, so the command died before reporting anything; use the shell's own MispAttribute - [cli] Event normalizeIpAddress reaches the attribute model again. [Claude Opus 5.5, iglocska] - The shell called $this->Event->MispAttribute, which is null since the MispAttribute rename (the association is still Attribute), so the command died before doing anything; use the shell's own MispAttribute - [attributes] breakOnDuplicate:0 finds a value the save reshapes. [Claude Opus 5.5, iglocska] - The upsert looked the incoming value up raw, before beforeValidate trims, refangs and normalises it, so a leading space, a defanged URL or an uncompressed IPv6 missed the stored attribute; with the uniqueness rule off on that path, the save then stored the same value a second time - Shape the lookup value the way beforeValidate does - [Overmind] Improved whole sighting feature. [ThomasLcr] - [Overmind] Keep items selected when switching between table/card index. [ThomasLcr] - [Overmind] Fixed Default filtering on Warninglist index. [ThomasLcr] - [Overmind] Added RequestHandler due to new requirement in AppController. [ThomasLcr] - [Overmind] Error message instead of silent error after creating user without required fields. [ThomasLcr] - [Overmind] Block adding a note without content. [ThomasLcr] - [Overmind] Correct redirect after adding a report to an event. [ThomasLcr] - [Overmind] Correct redirect after unplishing an event. [ThomasLcr] - [Overmind] Correct redirect after creating an event with a template. [ThomasLcr] - [Overmind] Galaxy filter works on Events index. [ThomasLcr] - [db] Print a missing table in schemaDiagnostics without crashing. [Claude Opus 5.5, iglocska] - compareDBSchema() describes a missing table with expected_table, not expected; the shell read expected for every entry and died in implode() - Print the Expected line only when the entry has one, as the web diagnostics element already does - Surfaced in CI by the allowedlist removal: db_schema.json lists the table until it is regenerated for the release - [security] Make redis host and attachment download settings cli_only. [Claude Opus 4.8, iglocska] A hijacked site-admin session (e.g. through stored XSS) could repoint MISP at an attacker-controlled Redis by changing a redis host setting from the UI or API and restarting the workers, which trust raw Redis job payloads - reaching command execution as the worker account. Flag the redis host settings cli_only so the connection target can only come from the server config or the CLI: - MISP.redis_host, Plugin.ZeroMQ_redis_host and SimpleBackgroundJobs.redis_host. - Also lock download_attachments_on_load, so a hijacked session cannot re-enable inline attachment rendering. - as reported by Logan Homolka - as reported by CERT.pl - [security] Bump cakephp to escape the download filename quoted-string. [Claude Opus 4.8, iglocska] Pulls sachertortephp e2c800217: CakeResponse::download() now escapes quotes and backslashes in the Content-Disposition filename, so a quote in a crafted attachment filename can no longer inject extra header parameters. - as reported by Logan Homolka - [security] Bump cakephp to strip control chars from download filenames. [Claude Opus 4.8, iglocska] Pulls sachertortephp afbc551aa: CakeResponse::download() now removes CR/LF and other control characters from the Content-Disposition filename, so a crafted attachment filename can no longer drop the header and have the body render inline. - as reported by Logan Homolka - [templates:view] Elements tab counts the template's elements. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [overmind] Prefix lazily loaded tab URLs with the base URL. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [sharing-groups:view] Show the member count when organisations are hidden. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [events:index] Org admins can filter by the email of a user of their org. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [galaxy-cluster:view] Count only the tagged attributes the user can see. [Claude Opus 5.5 (1M context), Sami Mokaddem] - [Overmind] Missing file update following 63ab4f101d841493debd05dc7a08d643d384ce36. [ThomasLcr] - [Overmind] Missing file update following 714de101fbb35fe56835c77613be8509c52a39cf. [ThomasLcr] - [Overmind] Display sharing group name in Views + distribution on Collections. [ThomasLcr] - [Overmind] used right variable names. [ThomasLcr] - [Overmind] Missing file update following 6ef609853255c50698dd88ab62d2392c27833a7c. [ThomasLcr] - [Overmind] SightingDb view are now functionals. [ThomasLcr] - [Overmind] Cerebrates view are now functionals. [ThomasLcr] - [Overmind] TaxiiServers view are now functionals. [ThomasLcr] - [Overmind] Missing file update following 6ef609853255c50698dd88ab62d2392c27833a7c. [ThomasLcr] - [Overmind] Fix on distribution selection. [ThomasLcr] - [Overmind] redirect to the correct tab after doing an edition in event view. [ThomasLcr] - [Overmind] Fix on distribution selection. [ThomasLcr] - [Overmind] Added disable mass action via checkbox. [ThomasLcr] - [Overmind] Block Target link for dead items in AnalystData/index. [ThomasLcr] - [Overmind] Updated path to event view for related chip. [ThomasLcr] - [security] fixed ACL trigger for event index. [iglocska] - leads to information leakage - as reported by Jeroen Pinoy Other ~~~~~ - Merge branch 'develop' into 2.5. [iglocska] - Merge branch 'develop' of github.com:MISP/MISP into develop. [iglocska] - Merge pull request #11101 from Wachizungu/fix-correct-extending- extended-event-index-filter-deletion. [Andras Iklody] fix: [UI:events index] correctly set index filter when trashing is_ex… - Merge branch '2.5' into develop. [Alexandre Dulaunoy] - Merge pull request #11150 from 0xDanielLopez/feed-phishunt-2. [Alexandre Dulaunoy] new: [feed] Add phishunt.io active phishing URLs feed - Merge pull request #11175 from Cosive/fix/event-graph-rendering. [Andras Iklody] fix: [event graph] handle numeric IDs and absent edge comments - Merge pull request #11176 from Cosive/fix/taxii-discovery-and-editing. [Andras Iklody] fix: [TAXII] repair connection discovery and editing - Merge branch 'develop' of github.com:MISP/MISP into develop. [iglocska] - Merge pull request #11188 from vpiserchia/2.5. [Andras Iklody] Ignore missing events in misp feeds - Merge pull request #1 from vpiserchia/vpiserchia-misp-feed-ignore- missing-event-in-manifest. [vpiserchia] Modify event parsing to continue on exceptions - Modify event parsing to continue on exceptions. [vpiserchia] Updated exception logging to ignore missing events instead of returning false. - Merge pull request #11187 from ThomasLcr/Overmind_develop. [Thomas Lacroix] - Merge branch 'Overmind_develop' of https://github.com/ThomasLcr/MISP into Overmind_develop. [ThomasLcr] - Merge branch 'develop' into Overmind_develop. [Thomas Lacroix] - Merge branch 'develop' of github.com:MISP/MISP into develop. [iglocska] - Merge branch 'worktree-feature-remove-allowedlists' into develop. [Sami Mokaddem] - Merge branch 'develop' of github.com:MISP/MISP into develop. [ecrou- exact] - Display sharing group badge for gc. [Thomas Lacroix] Add sharing group badge display for distribution type 4. - Implement responsive border for identity card. [Thomas Lacroix] Add responsive border utility for identity card layout. - Merge pull request #11186 from ThomasLcr/Overmind_develop. [Thomas Lacroix] Overmind : Add/edit object improvements & new Users/Organisations view - Merge pull request #11169 from ThomasLcr/Overmind_develop. [Thomas Lacroix] - Merge branch 'MISP:2.5' into Overmind_develop. [Thomas Lacroix] - Merge branch 'MISP:2.5' into Overmind_develop. [Thomas Lacroix] - Merge branch '2.5' into develop. [Claude Opus 5.5, iglocska] - Merge branch '2.5' into develop. [iglocska] v2.4.222 (2026-10-01) --------------------- Changes ~~~~~~~ - [internal] Unregister the phar stream wrapper in the entry points. [iglocska] - nothing in MISP, in the vendored CakePHP or in any library loaded at runtime reads or builds a Phar, but the wrapper makes an archive behave like a directory and turns any filesystem call on a caller-influenced path into an unserialize() sink - the web and console entry points now drop it before bootstrapping, so the primitive stays unavailable even where a caller has not been fixed: with the job-argument guard reverted, the argument-injection exploit that previously ran code as the web user no longer does - hardening from the internal review, following the report by Niels Teusink of Eye Security Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 08fa755b6363ec0b7194d97ea36800ae8eb8f919) Fix ~~~ - [VERSION] bump. [iglocska] - [api controller] added requesthandler component. [iglocska] - why did the pass for this test before?... (cherry picked from commit 5cd844ad18aa28baadbaf928a9ac638dcea82266) - [internal] Register the XML body guard only where RequestHandler is loaded. [Claude Opus 5.5, iglocska] - 8a13cbe78 (v2.4.221) registered the XML input type on $this->RequestHandler for every request, but ApiController, AllowedlistsController and PagesController do not load that component, so every request to api/*, allowedlists/* and pages/display/* died with "Call to a member function addInputType() on null" (500) - a controller without RequestHandler decodes no request body at all, so skipping the registration there leaves nothing unguarded; the older JSON input type below it only ever ran behind _isRest(), which is false for those controllers for the same reason - [crud] Save the model block alone, not the flat body beside it. [iglocska] - the add path handed the whole request data to save(), so a controller that promotes harvested parameters into the model's own block left the flat body sitting next to it; AppModel::save() refuses that shape, and correlation_exclusions/add answered 403 with an empty error list - the model's own block is now the record whenever the request carries one, which is what Model::set() resolved to before the refusal existed Co-Authored-By: Claude Opus 5 (cherry picked from commit c7ede862f52cd02c9a873916f7a128b290cdec7a) - [login] Refuse every unenrolled session request, not just AJAX. [iglocska] - the forced TOTP guard tested for an XHR, so an unenrolled browser session kept full access through any other machine-readable shape: a .json URL, restSearch, the automation actions. It now covers every request that cannot follow the redirect the browser path takes - an identity that came from an API key stays exempt, through the logged_by_authkey flag the session already carries Co-Authored-By: Claude Opus 5 (cherry picked from commit 6b527ba6e6a32aa574aa050eadf36207506dcea2) - [attribute] restore permission check was inverted for perm_modify users. [elhoim] Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit e1ad9e945f5ad25d820cceecb9f9e81ed8ec4dd2) - [settings] Module settings keep the flags the module declares. [iglocska] - readModuleSettings() rebuilt every module-supplied plugin setting from scratch and dropped the redacted and cli_only flags that Module::getModuleSettings() had read from the module's own meta.config, so a module declaring its API key as redacted still had the value served by servers/getSetting and servers/serverSettingsEdit, and a setting it marked cli_only was editable over the API. Both flags now travel with the setting definition - found while fixing the branch read reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5 (cherry picked from commit 6c02f0f5c33aab96e90df8791c3873303d7e99ce) - [settings] Server setting lookups address one setting, never a branch. [iglocska] - Server::getSettingData() returned whatever node the dotted name resolved to, so a branch name such as Security, MISP or Plugin came back as the sub-tree. A sub-tree carries no redacted flag of its own, so servers/getSetting passed the redaction check and answered with Configure::read() of the whole branch - Security.salt, the Redis passwords and the plugin API keys included - and servers/serverSettingsEdit, which takes the setting name from the resolved node, read the entire Configure store and returned that. The lookup now resolves a leaf setting only and reports anything else as an invalid setting, which is what all of its callers already assumed - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5 (cherry picked from commit 30b849102c687bb53919f1d5d20851bc20fafa4e) - [security] Galaxy icons are icon names, and the correlation graph sets them as an attribute. [Claude Fable 5.1, Claude Opus 5.5, iglocska] - a galaxy's icon field was saved unvalidated by galaxies/add, galaxies/edit and the sync/import capture, and both correlation graph scripts concatenated it into markup through D3 .html(), so a perm_galaxy_editor user (the stock User role) could store markup that runs script in the session of anyone opening the correlation graph of an event carrying one of the galaxy's clusters, in both themes; the model now accepts only Font Awesome icon names, capture drops anything else, the graph JSON falls back to globe for a stored value that is not one, both scripts set the class as an attribute, and the asset query version is bumped so browsers fetch the new scripts - as reported by Jeroen Pinoy Backport note (2.4): - app/Controller/AppController.php: kept 2.4's own version block (PyMISP 2.5.17.3, phpmin 7.2, …) and bumped 2.4's __queryVersion by one (179 → 180) so browsers reload correlation-graph.js, instead of taking develop's values - app/Model/Galaxy.php: 2.4's $validate uses array() syntax; the 'icon' => 'iconName' rule was added in that form. The constant, isValidIconName() and the capture guard applied unchanged - dropped app/webroot/js/correlation-graphOvermind.js: the Overmind theme does not exist on 2.4 - every icon of the 99 galaxies in the misp-galaxy version 2.4 pins passes the new rule, so galaxy updates are unaffected (GalaxyIconNameTest's shipped-icon check skips in a worktree without the submodule; checked by hand) (cherry picked from commit 8ea5783ddcfe69be6013337a0d6732ac75a862e6) - [security] Imported decaying models belong to the importer and are never default. [iglocska] - decayingModel/import stripped the id and pinned org_id and default on the submitted array and then saved it flat, so those guards were skipped by a record carrying its own DecayingModel key: a perm_decaying user could overwrite another organisation's model in place or mint one flagged as a default. The row is now built from an allow-list - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5 (cherry picked from commit 70e319e4b9dbbeca173befce2340eedf9d86f1b0) - [security] Delegation requests stay bound to the event they were authorised for. [iglocska] - delegateEvent() authorised only the event named in the URL but then saved the submitted record, so a caller-supplied primary key or event_id retargeted an existing delegation at any event on the instance; since a delegation row grants its organisation read access to the event it names, that handed over any event, and acceptDelegation then transferred ownership and deleted the original. The row is now built from an allow-list - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5 (cherry picked from commit d1f5684f9a193ea0a8a4f7709703011aa69d9682) - [security] A nested model alias key no longer selects the row a save targets. [Claude Opus 5, Claude Opus 5.5, iglocska] - helpers sanitised a flat record (id stripped, event_id and object_id pinned) and then saved it, but Model::set() prefers a key matching the model alias and drops the outer scalars, so a nested Attribute/Object/EventReport/Sighting/AttributeTag block overwrote, re-parented or soft-deleted any such row on the instance, including rows in events the caller cannot see - as reported by Jeroen Pinoy Backport note (2.4): - 2.4 carries the earlier fix this builds on (bc182d55d, picked as bede0ea88); all code hunks applied to the matching 2.4 code, the MispAttribute.php ones landing in app/Model/Attribute.php - app/Controller/OrganisationsController.php (2.4 only): admin_add() still nested a flat REST body as $this->request->data['Organisation'] = $this->request->data and saved the result, the exact mixed shape the new AppModel::save() check refuses, which would have broken REST organisation creation (PyMISP add_organisation posts a flat body). It now wraps the body instead. develop has no such site: organisations moved to the CRUD component there. Every other self-nesting assignment on 2.4 (ObjectsController, EventReport, SharingGroup, User) is shared with develop and never reaches save() in that shape - .github/workflows/main.yml: 2.4 has no testlive_ai_ux.py; only the testregressions.py line is added, after testlive_security.py. tests/testregressions.py uses nothing newer than 2.4's PyMISP pin (cherry picked from commit 9485ae40d334471882e3bd246651acaa68feef34) - [workflows] Escape misp-module parameter names used as form labels. [iglocska] - the parameter names reported by the misp-modules service became raw form labels on the workflow module page; escape them where they are translated - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 813a48b2bac0c9034f532b9181ac9a0c5fa59857) - [security] Link a galaxy cluster source only when it is an http(s) URL. [Claude Opus 5.5 (1M context), Claude Opus 5.5, iglocska] - the cluster source was linked whenever it passed FILTER_VALIDATE_URL, which accepts javascript: URLs, so a galaxy editor on this or a synced instance could store a link that runs script when clicked; link only http(s) sources, in both themes - as reported by Jeroen Pinoy Backport note (2.4): - dropped the app/View/Themed/Overmind/Elements/GalaxyClusters/View/galaxy_clusters_general.ctp hunk: 2.4 has no themes; the legacy app/View/GalaxyClusters/view.ctp hunk applies unchanged and is the only place on 2.4 that links a cluster source (galaxyQuickViewNew.ctp prints it through h() without a link) (cherry picked from commit 11852876773554d79ff57937a235d18a1e4473dc) - [sync] Only use a valid colour for remote tags in the event preview. [iglocska] - the remote event preview wrote each remote tag's colour into a style attribute, so a linked server could inject arbitrary CSS; accept only a hex colour, as local tags require - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 91323b517bb5a34f413363faf8703a3c0a1a9904) - [security] Cast the remote tag id in the event preview tag filter. [iglocska] - the remote event preview put each remote tag id into a JavaScript string in an inline onclick, where HTML escaping does not protect it, so a linked server could break out of the string; cast it to an integer - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 70ad174ddd438887687d40fc1e2e4e8b322a179e) - [security] Escape the JSON shown in the generic JSON element. [iglocska] - the TAXII object viewer printed the remote object's JSON unescaped inside a pre block, so markup in any string property was parsed as HTML; escape it - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 1bed4ca0c990a4c285e8caa1d7efd91fec43eaca) - [security] Treat the remote event id in the ID translator as an integer. [Claude Opus 5.5 (1M context), Claude Opus 5.5, iglocska] - the ID translator printed the event id returned by a linked server unescaped, so the server could inject markup into a host org user's page; cast the id where it enters and escape it in both themes - as reported by Jeroen Pinoy Backport note (2.4): - dropped the app/View/Themed/Overmind/Servers/id_translator.ctp hunk: 2.4 has no themes; the legacy app/View/Servers/id_translator.ctp and the ServersController casts apply unchanged and cover every remote-supplied value the 2.4 view prints (cherry picked from commit bd5e80c84f0ab853d88d14e14df9bd92786eb8f4) - [security] Escape the value of the count index field. [iglocska] - the count field escaped its link but printed the value raw, so a linked server could inject markup into the remote event preview index through the event id; escape the value - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 2a2981a27bd06bfd6fa37866db1911637d52538c) - [security] Cast the analyst data seed to an integer. [iglocska] - viewAnalystData passed the seed path argument unescaped into the notes panel's inline script; cast it to an integer in both controllers and in the analyst data elements - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 58925dbf01c2fe5dfe9b2f61a421f6463f66ca56) - [event] Remove every row belonging to an event when deleting it. [iglocska] - deleting an event left its event report tags, event graphs, proposal correlations, fuzzy ssdeep chunks and attachment scan results behind as orphans; delete them together with the event - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 5f78634af8ad2374a51ed979ffbac3084ae5f9d9) - [sync] Filter the tags of every event report pushed to a remote. [iglocska] - the local and non-exportable tag filter ran once after the loop instead of per report, so all but one report lost their tags on the remote, and when the last report was withheld a null report was pushed and the remote failed to save the event; filter each report in the loop - as reported by elhoim (https://github.com/elhoim) Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 0be4564a98f37c568a35aa88c5b2bf598a23328a) - [proposals] Apply the attribute ACL rules to proposals. [Claude Opus 5.5 (1M context), Claude Opus 5.5, iglocska] - the proposal ACL accepted any attribute or object carrying one of the user's sharing groups regardless of its distribution, and gave the owner organisation no access to proposals on its own org-only attributes; require distribution 4 for the sharing group test and let the owner organisation see them - as reported by elhoim (https://github.com/elhoim) Backport note (2.4): - app/Model/ShadowAttribute.php: 2.4's buildConditions() predates correlatedLookup() and writes the object lookups as keyed raw subselects ('(SELECT sharing_group_id FROM objects WHERE objects.id = Attribute.object_id)' => $sgids); the distribution-4 pairing was rewritten in that form. The Event.org_id owner test applies unchanged (cherry picked from commit 9c5af321fe8f1d2209c8b3c35f4d570d47e9af9e) - [security] Show soft-deleted attributes only to the event owner. [Claude Opus 5.5 (1M context), Claude Opus 5.5, iglocska] - attribute searches for deleted attributes and the paginated attribute view returned soft-deleted attributes of other organisations' events to anyone who could see the event; limit them to the owner org and sync users, as the event view does - as reported by elhoim (https://github.com/elhoim) Backport note (2.4): - app/Model/MispAttribute.php → app/Model/Attribute.php: 2.4's fetchAttributes() is the older shape (it sets $conditions['AND']['Attribute.deleted'] as a keyed entry, not a list item), so the owner condition was added by hand; the query always joins Event there, so Event.org_id resolves - dropped the app/Model/Event.php hunk: it patches fetchPaginatedAttributes(), the 2.5 event view's paginated attribute fetcher, which does not exist on 2.4 (cherry picked from commit bd81c23cf2aced3c72766369dc813612edd52509) - [security] Check correlations against the live event ACL. [Claude Opus 5.5 (1M context), Claude Opus 5.5, iglocska] - correlations were authorised against the distribution copied onto the correlation row, which has no published flag and goes stale when an event is restricted, so attribute searches with correlations exposed attributes and event details of events the user cannot see; check the live rows instead - as reported by elhoim (https://github.com/elhoim) Backport note (2.4): - app/Model/Behavior/DefaultCorrelationBehavior.php: dropped the `$excludeNonCorrelating` branch of fetchRelatedEventIds() — that parameter and branch arrived on develop with the 2.5 event view and do not exist on 2.4; the plain path's return is wrapped in __filterVisibleEventIds() as on develop, which also covers 2.4's getRelatedEventCount() (cherry picked from commit 100235bd99b9f57a5a09976412d54e2001d2e0c4) - [login] Let only one request spend an e-mailed OTP. [iglocska] - two parallel submissions of the same e-mailed OTP could both log in, as the code was read and deleted separately; the request whose delete removes it is now the only one that may use it - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit ba95e67d545efa313435ae39dd481879d72e72e6) - [security] Refuse a TOTP code that was already used to log in. [iglocska] - a TOTP code could be used again by another login within its validity period; record the period each accepted code belongs to and refuse a second use - as reported by Tanguy Snoeck of NCIA Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit a020fa47b6c3cb5b43d841afe2ccf149889fad6b) - [security] Burn paper OTP tokens against the stored counter. [iglocska] - HOTP tokens were checked against the counter cached in the session at password time, so a session opened earlier could reuse a burned token and rewind the counter; verify against the stored counter under a lock and drop the cached login once it succeeds - as reported by Tanguy Snoeck of NCIA Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit f34aee2c74e111fffd07e8ddde8e4843ccf998db) - [security] Apply the thread ACL when posting to a discussion. [iglocska] - posts/add only refused org-only threads, so a user outside a sharing group or unable to see the event could read the quoted post and thread title and post into its discussion - as reported by Bastien Bossiroy and Célien Desteucq of NCIA Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 79fbd4c7580adc0518581351c3d8c3d5b3ac7c97) - [security] Validate the event graph preview and stop rendering it as HTML. [iglocska] - the event graph preview_img was stored unvalidated and rendered into an img src by string concatenation, a stored XSS; validate it as a base64 PNG data URL and build the preview img via the DOM instead - as reported by Bastien Bossiroy of NCIA Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 92c7ccc4398a64e61699bd79fb4010703616fc59) - [security] Escape the tag name on the taxonomy tag confirmation forms. [iglocska] - the legacy addTag/disableTag confirmation forms echoed the name from the URL unescaped, a reflected XSS against site admins - as reported by Célien Desteucq of NCIA Co-Authored-By: Claude Opus 5.5 (1M context) (cherry picked from commit 9619083c8cea496fd3ddbad5bf9be57c91fd2118) - [login] enforce TOTP enrolment on AJAX requests. [iglocska] - an AJAX request let an unenrolled user skip the forced TOTP setup on an otp_required instance; API keys are unaffected - as reported by Tanguy Snoeck of NCIA Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 8deb0619e5ed6b12a1aa94967c68c977eb05398f) - [correlation] fix correlation distribution refresh on event save. [iglocska] - correlation update wasn't firing on event edits changing the distribution/sharing_group_id Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 19a389d19f65e25ba3328e72e6ad23919a39ccd0) - [event] Gate flattened attributes on the object ACL alone. [Claude Opus 5, Claude Opus 5.5, iglocska] - the flatten path reused the whole Object contain as its gate, so the contain's soft-delete conditions also decided which attributes came back: an event owner asking for deleted attributes lost every one whose object is still live - the gate is now the object distribution ACL, correlated on the object's primary key - regression test covers the ACL and the soft-delete case, in both directions Backport note (2.4): - app/Model/Event.php: 2.4 writes the object owner test as the key form `$objectCondSelect => $user['org_id']` rather than develop's `$objectCondSelect . ' = ' . (int)$user['org_id']` string; $objectAclCondition wraps the 2.4 form unchanged, so the Object contain's conditions are identical to before - dropped the tests/testregressions.py hunk here: the file does not exist on 2.4 yet (it arrives with 9485ae40d later in this round) - ported directly after ab08edf92 rather than in develop order, so no commit on the branch carries the soft-delete regression ab08edf92 introduced on its own (cherry picked from commit 07f3486d50f2a5ee0f31ea66c920692664397ddb) - [security] Apply the object ACL to flattened attributes. [Claude Opus 4.8, Claude Opus 5.5, iglocska] - Flattening an event dropped the object distribution and sharing-group check, so an attribute inside an object the caller may not see was returned as a top-level attribute of a community event they can - as reported by Wenhao Wu Backport note (2.4): - dropped the fetchPaginatedAttributes() hunk: that paginated attribute fetcher belongs to the 2.5 event view and does not exist on 2.4 (its conflict dragged in 2.5-only helpers such as attributeGalaxiesFromTags() and getExtensionEventSet()) - the fetchEvent() flatten hunk applied unchanged; $conditionsObjects, $isSiteAdmin and subQueryGenerator() have the same shape on 2.4 (cherry picked from commit ab08edf9256bb3c9c8a382e0778ecd10b9e29c7c) - [security] Scope the related event list to what the caller may read. [Claude Opus 5 (1M context), Claude Opus 5.5, iglocska] - The related event list was hydrated straight from the correlation table, which authorises against a snapshot of the event's distribution and carries no published flag, so events the caller cannot open were listed with their metadata - as reported by Wenhao Wu Backport note (2.4): - dropped the app/Controller/EventsController.php hunk: viewRelatedEvents() is the 2.5 event view's endpoint and does not exist on 2.4; the related event list 2.4 renders comes from Event::getRelatedEvents(), which the Event.php hunk fixes (cherry picked from commit 2ffa97f0526cd6579b91a4dea560f6246ecbe108) - Missing argument error when trying to enrich an object. [Claude Opus 5.5, Luciano Righetti] Backport note (2.4): - app/Controller/EventsController.php: dropped the first sentence of the added comment ("Unlike fetchAttributes(), fetchObjects() honours this field list literally"): on 2.4 fetchObjects() still hardcodes Event.id/info/org_id/orgc_id and merges the caller's contain, so the develop-only failure this commit fixes does not occur there. The other two hunks fix latent 2.4 bugs from the same code: $object[0]['Object']['value'] (objects carry no value) and the stale by-reference $attribute in the initial-object lookup (cherry picked from commit 372639d2cb67582023ae816d86b4f2e0f68e3d4d) - [organisation] Reject a forged upload path in the org-logo upload. [iglocska] - OrganisationsController::__uploadLogo probed the caller-supplied tmp_name with file_exists/mime/exif before is_uploaded_file, a site-admin-only file existence/image-type oracle mirroring the event-report picture upload; the guard is now hoisted before any filesystem probe - found during the internal review, not externally reported Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 12eaadc9e28bdb7fc723faa2f006eaaa13c4ffdb) - [ui] Point the org-statistics logo flag at the live directory and guard it. [iglocska] - the org statistics logo flag tested app/webroot/img/orgs, which no longer exists since org logos moved to files/img/orgs, so it never fired; it now checks files/img/orgs by id, name and uuid across png and svg like getOrgLogo, behind a realpath prefix check so an org name containing ../ cannot traverse out of the directory - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit a2f7cba6e74b791e30013f10720dadbc4117d989) - [ui] Escape MISP.org when it is echoed into the admin email script. [iglocska] - the admin email screen printed the MISP.org setting straight into a JavaScript string, so an org name containing a quote could break out and run script; it now goes through json_encode with the HTML-safe flags - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 5d6ace65e1d523dcbf04ce405a2f3a833cd353b2) - [ACL] tightening of eventreports replaceSuggestionIntReport. [iglocska] - as reported by Jeroen Pinoy (cherry picked from commit 66aebfb1a1e58a82b3a681367347f69c46c38ee5) - [xss] via JS innerHTML - as reported by David Andre and reproduced by Jeroen Pinoy. [iglocska] (cherry picked from commit b062698f269996ffe3ceb23de78612d768a3bfe2) - [stix1 import] Honour the distribution chosen in the upload form. [Christian Studer] (cherry picked from commit 335bc5a15f5b17a2ad6a1f8d6f8d2404e95d4016) - [login] Fetch User.disabled in the pre-auth TOTP lookup. [iglocska] - login() reads $unauth_user['User']['disabled'] in the TOTP branch, but the pre-auth find() never selected the column, so every login by a TOTP-enrolled user logged an "Undefined array key" warning - harmless in practice (the identify() result is re-checked one line later) but noisy since the TOTP feature landed in 2023 - select the column so the check does what it was written to do Co-Authored-By: Claude Fable 5.1 (cherry picked from commit 3df982ab192e05f5369d62af5674c7a874b32756) - [event-report] Render and escape MISP element references in PDF exports. [iglocska] - element references in PDF exports were not HTML-escaped and attribute() had no value placeholder - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 949744a4b6de919eca07644b6a643de88b706780) - [logging] Throttle the two unguarded auth_fail writes. [iglocska] - two of the three API auth-failure messages bypassed the hourly per-key throttle - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 2bf8874336518d8c5ef6a42e51e78900ec242630) - [logging] Log auth failures when the throttle cannot reach Redis. [iglocska] - _shouldLog() failed closed, so a Redis outage silenced every auth-failure log write - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit a39b25d2f141dde954a2f00feed5c6eb9e3989b5) - [event-report] Count picture references by alias as well as filename. [iglocska] - a duplicated 'content LIKE' key made picture usage counts ignore the filename, and the purge missed alias references - found while reviewing a report by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 32cd9f872911dbbc7ac1d9bdf0d99dc6a8f19317) - [acl] Authorise the object a graph reference hangs off. [iglocska] - get_reference_data() returned any object reference by UUID without authorising its parent object - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit c0cb5c9f8c6a892c7b3379093c6e252bc3b679a7) - [acl] Compare the dashboard template permission flag as a string. [Claude Opus 5 (1M context), Claude Opus 5.5, iglocska] - restrict_to_permission_flag is a varchar compared against integer 0, which MySQL coerced to true for every row - found during the internal review, not externally reported Backport note (2.4): - app/Controller/DashboardsController.php: the same integer-0 comparison sits in 2.4's listTemplates() in array() syntax and a different context; changed by hand to array('', '0') with develop's comment. The restrict_to_permission_flag column is varchar(191) with default '' on 2.4 as well (db_schema.json) (cherry picked from commit 245b8d63a3794d048fb88275512fa0d32981f0b8) - [servers] Confine deleteFile to its own directory. [iglocska] - deleteFile concatenated the raw route parameter into a path; it is now basename()d like its sibling uploadFile - as reported by elhoim (David André) and Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit fcf30dee0614e58af03f916a0117be7999f5ccbe) - [feeds] Scope the freetext preview's feed correlations to the caller. [Claude Opus 5 (1M context), Claude Opus 5.5, iglocska] - the freetext preview's cross-feed correlations listed feeds the caller may not view - found during the internal review, not externally reported Backport note (2.4): - app/Model/Feed.php: textual conflict only (visibleConditions() lands next to a comment the September round had already rewritten); the getFreetextFeedCorrelations($data, $feedId, array $user) signature and its FeedsController::previewIndex caller were already on 2.4 from that round's review fix, so those hunks were no-ops (cherry picked from commit dc1a0f7c224c5ed4b5022cdc89cbe02adabcf2aa) - [feeds] Compare the host org id as an int in __canViewFeed. [iglocska] - __canViewFeed compared an int host org id against a string session value with !==, refusing host-org users - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 1fb622046cd390a4a807627740911c923f1728e5) - [feeds] Stop disclosing other feeds' URLs in the freetext preview. [iglocska] - the freetext feed preview disclosed every other feed's URL in its correlation listing - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 4b69160864c23abaa8bafe3e9515038c69b2f8d3) - [dashboard] Emit well-formed CSV from the widget export. [Claude Opus 5 (1M context), Claude Opus 5.5, iglocska] - the widget CSV export left keys unquoted and never doubled embedded quotes - as reported by elhoim (David André) and Scottish Government - National Cyber Team Backport note (2.4): - app/Controller/DashboardsController.php: 2.4 has no _dataToCsv() helper (develop extracted it with the v2 dashboard); the CSV writer is inline in renderWidget()'s exportcsv branch. The inline block is replaced by a call to _dataToCsv(), which carries develop's post-fix body, plus _csvField() - one byte of behaviour differs from 2.4's old inline writer beyond the fix: the tabular branch now ends with a newline, as develop's helper always did (app/Test/DashboardCsvExportTest.php asserts it) (cherry picked from commit ad4b4327bcc6bda65ee773c1a25efffd9511c20f) - [settings] Correct the false exposure claim on eventreport_enable_arbitrary_urls. [iglocska] - the setting description claimed only a site admin could reach the URL import; any perm_add user can - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 921cdb1a5072175aeebb09384807e373d3f85e74) - [acl] Require perm_add for templates uploadFile. [elhoim] The ACL entry for templates/uploadFile was array('*'), which makes ACLComponent::checkAccess() return true for any authenticated user regardless of role. Every sibling action in the same block requires perm_template (add/delete/edit/saveElementSorting) or perm_add (populateEventFromTemplate, submitEventPopulation, deleteTemporaryFile). TemplatesController::uploadFile() accepts an upload with no content type, extension or size validation beyond size > 0 and error == 0, and writes it into app/tmp/files/. A user holding a read-only role -- one with no perm_add and no perm_template -- can therefore write arbitrary content into that directory, repeatedly and without any quota. Scope of the impact, having checked the two things that would make it worse: - The stored name is generateRandomFileName() (a random 12-character string), not the submitted name, so there is no traversal and no predictable-name overwrite. checkFilename() rejects path separators in the original name in any case. - app/tmp/ is outside app/webroot/, and no route or controller serves those bytes back over HTTP by filename, so this is not a path to stored XSS or code execution. What is left is unbounded disk consumption by any authenticated user, and an ACL entry inconsistent with every neighbouring action. perm_add matches populateEventFromTemplate, which is the action that consumes these staged files. Note for reviewers: '*' may have been deliberate to support some UI flow. If a legitimate caller needs it, perm_add is the wrong choice and the upload should instead be quota-limited -- but the current entry lets a role with no permissions at all write to disk, which looks unintended. (cherry picked from commit 8e8885971c51b201753778544476aa88ac98fb46) - [restsearch] Honor distribution=0 filter in fetchEvent. [elhoim] Event::fetchEvent() built its distribution condition with: if ($options['distribution']) { a plain truthiness check, so an explicit REST filter of "distribution": 0 ("your organisation only") is indistinguishable from the filter not being passed at all — the Event/Attribute/Object/EventReport distribution conditions were silently skipped whenever 0 (or the string "0") was supplied. 'distribution' is a documented accepted filter (RestSearchComponent.php's Event paramArray) and restSearch() passes filters straight into fetchEvent($user, $filters, true) with no normalisation, so this reached fetchEvent() unmodified. Switch to isset(), matching the pattern already used a few lines below for 'protected' and 'published'. fetchEvent() defaults every entry in $this->possibleOptions to null when absent, so isset() correctly distinguishes "filter not supplied" (null) from "filter supplied as 0" (set, falsy). This is a broken filter contract, not a security issue: the independent ACL block earlier in the same method already constrains visible results regardless of this filter. (cherry picked from commit e5622653763787acb8d3c88a81b1087423fdbdbc) - [correlation] Add missing org_id guard to object/attribute ACL. [elhoim] This is a false negative, not a disclosure: it can only ever ADD a deny condition, so it cannot leak anything. The effect is that a member of the owning org can be wrongly denied visibility of their own org's correlation. checkCorrelationACL() denies visibility of a correlation. The event-level check correctly denies only when the correlation belongs to a different org AND has a restrictive distribution: $correlation[$prefix . 'org_id'] != $user['org_id'] && ($correlation[$prefix . 'event_distribution'] == 0 || ...) The object-level block and the attribute-level block that follow omit the org_id comparison entirely: if ( $correlation[$prefix . 'object_id'] && ( $correlation[$prefix . 'object_distribution'] == 0 || ... ) ) { return false; } so they deny on distribution == 0 unconditionally, even for a user in the object's/attribute's own owning org. Add the same '$correlation[$prefix . "org_id"] != $user["org_id"] &&' guard used at the event level to both blocks, restoring correct same-org visibility. (cherry picked from commit af8d9c9ab9dca6f7111fdd674fb4f1d1956bd0ed) - [collections] Compare distribution numerically in Collection::mayView. [elhoim] Collection::mayView() tested the sharing-group case with a strict comparison: if ($collection['Collection']['distribution'] === 4) { The value comes straight from find('first') with no cast, and app/Config/database.default.php sets PDO::ATTR_STRINGIFY_FETCHES => true (described there as "required for compatibility with the MISP standard / pre 2.5 behaviour"), so every integer column is returned as a PHP string. '4' === 4 is false, which makes the whole sharing-group branch dead code. Execution then falls past it to the closing `return false`, so a distribution = 4 collection is refused to precisely the users it is meant to be shared with: members of an authorised sharing group outside the owning organisation. Only site admins and same-org users can open it, and they match on the earlier checks. The two comparisons immediately above are unaffected because they are loose -- line 144 uses == and line 147 uses in_array() without the strict flag -- which is why this went unnoticed. Casting to int matches how the rest of the codebase handles this column, including elsewhere in this same file (lines 468 and 477) and in Event.php:2027. (cherry picked from commit 91f96cccb23540986380c79fd38ad936d86c759b) - [sharingGroup] guard RemoteOrg uuid in checkIfServerInSG. [iglocska] Pre-existing hygiene, not part of the collection-sync feature. The org loop guarded $org['Organisation'] but then dereferenced $server['RemoteOrg']['uuid'] unguarded, emitting a PHP 8 "Undefined array key" warning for a server row without a loaded RemoteOrg relation. Extend the isset() to cover both nested uuids. This also closes a latent edge case: previously two absent uuids compared null === null and wrongly reported the server as in the sharing group; now both must be present to match. Co-Authored-By: Claude Opus 4.8 (1M context) (cherry picked from commit 71da18cc00c4151ba6c98e79f08e36d035849ce0) - [dashboard] NewUsersWidget - enforce admin perm and org scope. [Claude Opus 5.5, skraft9] The New Users widget listed accounts (id, organisation, role, creation date) across every organisation to any authenticated user, and its e-mail filter still applied as a WHERE clause even when the e-mail column was redacted. Align it with the /admin/users boundary: - add checkPermissions() requiring perm_admin or perm_site_admin - scope the query to the viewer's own org for non site admins - drop the e-mail filter key when e-mails are redacted Backport note (2.4): - app/Lib/Dashboard/NewUsersWidget.php: 2.4 already redacts through User::canSeeEmails() (from the September round), so $redactEmails is computed with it, as develop does today, rather than with the inline perm_site_admin/disclose_user_emails test the original commit carried (cherry picked from commit 5fa44460f1d08554e004269fa8956b2b0e55a8bd) - [api] Keep the GET form of the POST-only actions working for API-key callers. [Claude Fable 5.1, iglocska] - the September round made nineteen state-changing actions POST-only (feed fetch/cache/enable/disable, server pull/push/cache/updateJSON/removeOrphanedCorrelations, blocklist delete, pruneUpdateLogs, enableWarninglist, enableNoticelist, cullEmptyEvents, purgeUnusedPictures, the sharing-group quick edits, rebuildRedis, request_API), which broke every PyMISP older than 2.5.34.2 - fetch_feed(), cache_feed(), cache_all_feeds(), server_pull() and server_push() all issue GET - and with it the 2.4 CI, whose pinned PyMISP predates the client-side switch to POST - the GET form is a CSRF problem only for a caller whose credential the browser attaches on its own, a session cookie; an API key rides a header a cross-origin page cannot set without a preflight, so a GET carrying one cannot have been forged. Each of the nineteen checks now goes through AppController::_requirePostUnlessApiKey(), which keeps the POST requirement for sessions and accepts the historical GET from API-key callers - the 2.5 line stays POST-only and ships the matching PyMISP; bumping the 2.4 PyMISP pin instead was not an option, as the newer test suite exercises a noSightings view parameter 2.4 does not have - [api] Stop black-holing the uncredentialed REST register and forgot calls. [iglocska] - the form-security exemption now rides the API key, which left register, forgot and password_reset black-holed for the REST clients that reach them with no credential at all - found by CI after the security review, not externally reported Co-Authored-By: Claude Fable 5.1 (cherry picked from commit f543cff87cf61a5507018865120b92eb04dc5b35) Other ~~~~~ - Merge branch '2.4-develop' into 2.4. [iglocska] - Test: [regressions] Cover the flattened object ACL and its soft-delete case. [Claude Opus 5, Claude Opus 5.5, iglocska] - regression test for the object distribution ACL on flattened attributes, in both directions: an organisation-only object's attributes stay hidden from an outsider, and the event owner still gets the soft-deleted attributes of a live object Backport note (2.4): - the tests/testregressions.py half of 07f3486d5, split off because that fix is ported directly after ab08edf92 (so no commit carries the soft-delete regression), before tests/testregressions.py exists on 2.4; the file arrives with 9485ae40d. The hunk applies unchanged on top of d1f5684f9 and 70e319e4b, as on develop (cherry picked from commit 07f3486d50f2a5ee0f31ea66c920692664397ddb) v2.5.48 (2026-09-28) -------------------- New ~~~ - [export] xlsx export added. [Claude Opus 5, iglocska] - as reported by too many to list... - XlsxExport inherits CsvExport's field and row logic verbatim, accumulates the CSV in its own temporary file and converts it in footer() - new XlsxWriterTool: streaming OOXML writer, string cells only, sheet rollover at the Excel row limit, per-cell truncation, control-character scrubbing and UTF-8 repair - values Excel would read as a formula keep their exact content and carry the quotePrefix style instead, so nothing is ever evaluated; the CSV export is left unchanged - escape_formulas_literal:1 switches to a literal apostrophe for people who re-export the workbook to CSV - the attribute, object and sighting restSearch drivers now honour a TmpFileTool returned from footer(), as the event driver already did - offered on the event, attribute and sighting scopes and in both the per-event download list and the mass export picker Changes ~~~~~~~ - [VERSION] bump. [iglocska] - [export] list XLSX above CSV in the export pickers. [Claude Opus 5, iglocska] - puts the spreadsheet format first in the per-event download list, the mass export picker and the UiBeta event view, so it is read before the CSV entry - pure reordering, no URLs or labels changed - [export] flag the CSV download as not being for Excel. [Claude Opus 5, iglocska] - the CSV entries in the per-event download list, the mass export picker and the UiBeta event view now read "CSV (NOT FOR EXCEL)", so people reaching for a spreadsheet pick the xlsx export instead - UiBeta carries its own hardcoded download list rather than the controller's, so it was missing the xlsx entries entirely; added there too - [export] drop the unused counters from the xlsx writer. [Claude Opus 5, iglocska] - values over Excel's 32,767 character cell limit are still truncated, just silently: nothing consumed the count and an export tool cannot set response headers, so carrying it up would have meant a new out-parameter on the restSearch signature of four models - removes truncatedCells(), escapedCells() and sheetCount() along with the field that only existed to let sheetCount() survive the temporary file cleanup - [dev] Document data-scale and hardware-spread performance guidance in CLAUDE.md. [Claude Opus 4.8, iglocska] - events can exceed 1M attributes and MISP runs on 8GB to 512GB hosts; reason about event- vs instance-scale cost and extrapolate with EXPLAIN/ANALYZE, not laptop timings - [dev] Document the code-comment convention in CLAUDE.md. [Claude Opus 4.8, iglocska] - Keep comments minimal and never reference tracker or planning identifiers in code Fix ~~~ - [crud] Save the model block alone, not the flat body beside it. [Claude Opus 5, iglocska] - the add path handed the whole request data to save(), so a controller that promotes harvested parameters into the model's own block left the flat body sitting next to it; AppModel::save() refuses that shape, and correlation_exclusions/add answered 403 with an empty error list - the model's own block is now the record whenever the request carries one, which is what Model::set() resolved to before the refusal existed - [login] Refuse every unenrolled session request, not just AJAX. [Claude Opus 5, iglocska] - the forced TOTP guard tested for an XHR, so an unenrolled browser session kept full access through any other machine-readable shape: a .json URL, restSearch, the automation actions. It now covers every request that cannot follow the redirect the browser path takes - an identity that came from an API key stays exempt, through the logged_by_authkey flag the session already carries - [event] Gate flattened attributes on the object ACL alone. [Claude Opus 5, iglocska] - the flatten path reused the whole Object contain as its gate, so the contain's soft-delete conditions also decided which attributes came back: an event owner asking for deleted attributes lost every one whose object is still live - the gate is now the object distribution ACL, correlated on the object's primary key - regression test covers the ACL and the soft-delete case, in both directions - [attribute] restore permission check was inverted for perm_modify users. [Claude Opus 5.5 (1M context), elhoim] - [settings] Module settings keep the flags the module declares. [Claude Opus 5, iglocska] - readModuleSettings() rebuilt every module-supplied plugin setting from scratch and dropped the redacted and cli_only flags that Module::getModuleSettings() had read from the module's own meta.config, so a module declaring its API key as redacted still had the value served by servers/getSetting and servers/serverSettingsEdit, and a setting it marked cli_only was editable over the API. Both flags now travel with the setting definition - found while fixing the branch read reported by Jeroen Pinoy - [settings] Server setting lookups address one setting, never a branch. [Claude Opus 5, iglocska] - Server::getSettingData() returned whatever node the dotted name resolved to, so a branch name such as Security, MISP or Plugin came back as the sub-tree. A sub-tree carries no redacted flag of its own, so servers/getSetting passed the redaction check and answered with Configure::read() of the whole branch - Security.salt, the Redis passwords and the plugin API keys included - and servers/serverSettingsEdit, which takes the setting name from the resolved node, read the entire Configure store and returned that. The lookup now resolves a leaf setting only and reports anything else as an invalid setting, which is what all of its callers already assumed - as reported by Jeroen Pinoy - [security] Galaxy icons are icon names, and the correlation graph sets them as an attribute. [Claude Fable 5.1, iglocska] - a galaxy's icon field was saved unvalidated by galaxies/add, galaxies/edit and the sync/import capture, and both correlation graph scripts concatenated it into markup through D3 .html(), so a perm_galaxy_editor user (the stock User role) could store markup that runs script in the session of anyone opening the correlation graph of an event carrying one of the galaxy's clusters, in both themes; the model now accepts only Font Awesome icon names, capture drops anything else, the graph JSON falls back to globe for a stored value that is not one, both scripts set the class as an attribute, and the asset query version is bumped so browsers fetch the new scripts - as reported by Jeroen Pinoy - [security] Imported decaying models belong to the importer and are never default. [Claude Opus 5, iglocska] - decayingModel/import stripped the id and pinned org_id and default on the submitted array and then saved it flat, so those guards were skipped by a record carrying its own DecayingModel key: a perm_decaying user could overwrite another organisation's model in place or mint one flagged as a default. The row is now built from an allow-list - as reported by Jeroen Pinoy - [security] Delegation requests stay bound to the event they were authorised for. [Claude Opus 5, iglocska] - delegateEvent() authorised only the event named in the URL but then saved the submitted record, so a caller-supplied primary key or event_id retargeted an existing delegation at any event on the instance; since a delegation row grants its organisation read access to the event it names, that handed over any event, and acceptDelegation then transferred ownership and deleted the original. The row is now built from an allow-list - as reported by Jeroen Pinoy - [security] A nested model alias key no longer selects the row a save targets. [Claude Opus 5, iglocska] - helpers sanitised a flat record (id stripped, event_id and object_id pinned) and then saved it, but Model::set() prefers a key matching the model alias and drops the outer scalars, so a nested Attribute/Object/EventReport/Sighting/AttributeTag block overwrote, re-parented or soft-deleted any such row on the instance, including rows in events the caller cannot see - as reported by Jeroen Pinoy - [security] Tag collection saves no longer write sibling user/org rows. [Claude Opus 4.8, iglocska] - addWithTags/editWithTags passed the full request to saveAssociated(), so a perm_tag_editor user could inject a User or Organisation sibling and escalate to site admin; the collection and its tags are now saved on their own - as reported by Jeroen Pinoy - [workflows] Escape misp-module parameter names used as form labels. [Claude Opus 5.5 (1M context), iglocska] - the parameter names reported by the misp-modules service became raw form labels on the workflow module page; escape them where they are translated - as reported by Jeroen Pinoy - [security] Link a galaxy cluster source only when it is an http(s) URL. [Claude Opus 5.5 (1M context), iglocska] - the cluster source was linked whenever it passed FILTER_VALIDATE_URL, which accepts javascript: URLs, so a galaxy editor on this or a synced instance could store a link that runs script when clicked; link only http(s) sources, in both themes - as reported by Jeroen Pinoy - [sync] Only use a valid colour for remote tags in the event preview. [Claude Opus 5.5 (1M context), iglocska] - the remote event preview wrote each remote tag's colour into a style attribute, so a linked server could inject arbitrary CSS; accept only a hex colour, as local tags require - found during the internal review, not externally reported - [security] Cast the remote tag id in the event preview tag filter. [Claude Opus 5.5 (1M context), iglocska] - the remote event preview put each remote tag id into a JavaScript string in an inline onclick, where HTML escaping does not protect it, so a linked server could break out of the string; cast it to an integer - as reported by Jeroen Pinoy - [security] Escape the JSON shown in the generic JSON element. [Claude Opus 5.5 (1M context), iglocska] - the TAXII object viewer printed the remote object's JSON unescaped inside a pre block, so markup in any string property was parsed as HTML; escape it - as reported by Jeroen Pinoy - [security] Treat the remote event id in the ID translator as an integer. [Claude Opus 5.5 (1M context), iglocska] - the ID translator printed the event id returned by a linked server unescaped, so the server could inject markup into a host org user's page; cast the id where it enters and escape it in both themes - as reported by Jeroen Pinoy - [security] Escape the value of the count index field. [Claude Opus 5.5 (1M context), iglocska] - the count field escaped its link but printed the value raw, so a linked server could inject markup into the remote event preview index through the event id; escape the value - as reported by Jeroen Pinoy - [security] Cast the analyst data seed to an integer. [Claude Opus 5.5 (1M context), iglocska] - viewAnalystData passed the seed path argument unescaped into the notes panel's inline script; cast it to an integer in both controllers and in the analyst data elements - as reported by Jeroen Pinoy - [event] Remove every row belonging to an event when deleting it. [Claude Opus 5.5 (1M context), iglocska] - deleting an event left its event report tags, event graphs, proposal correlations, fuzzy ssdeep chunks and attachment scan results behind as orphans; delete them together with the event - found during the internal review, not externally reported - [sync] Filter the tags of every event report pushed to a remote. [Claude Opus 5.5 (1M context), iglocska] - the local and non-exportable tag filter ran once after the loop instead of per report, so all but one report lost their tags on the remote, and when the last report was withheld a null report was pushed and the remote failed to save the event; filter each report in the loop - as reported by elhoim (https://github.com/elhoim) - [proposals] Apply the attribute ACL rules to proposals. [Claude Opus 5.5 (1M context), iglocska] - the proposal ACL accepted any attribute or object carrying one of the user's sharing groups regardless of its distribution, and gave the owner organisation no access to proposals on its own org-only attributes; require distribution 4 for the sharing group test and let the owner organisation see them - as reported by elhoim (https://github.com/elhoim) - [sync] Accept objects without a description. [Claude Opus 5.5 (1M context), iglocska] - an object created without a description is stored with none, but any copy of it carrying the empty description was rejected, so every instance receiving it through sync dropped the object and its attributes; allow the description to be empty - found during the internal review, not externally reported - [security] Show soft-deleted attributes only to the event owner. [Claude Opus 5.5 (1M context), iglocska] - attribute searches for deleted attributes and the paginated attribute view returned soft-deleted attributes of other organisations' events to anyone who could see the event; limit them to the owner org and sync users, as the event view does - as reported by elhoim (https://github.com/elhoim) - [security] Check correlations against the live event ACL. [Claude Opus 5.5 (1M context), iglocska] - correlations were authorised against the distribution copied onto the correlation row, which has no published flag and goes stale when an event is restricted, so attribute searches with correlations exposed attributes and event details of events the user cannot see; check the live rows instead - as reported by elhoim (https://github.com/elhoim) - [login] Let only one request spend an e-mailed OTP. [Claude Opus 5.5 (1M context), iglocska] - two parallel submissions of the same e-mailed OTP could both log in, as the code was read and deleted separately; the request whose delete removes it is now the only one that may use it - found during the internal review, not externally reported - [security] Refuse a TOTP code that was already used to log in. [Claude Opus 5.5 (1M context), iglocska] - a TOTP code could be used again by another login within its validity period; record the period each accepted code belongs to and refuse a second use - as reported by Tanguy Snoeck of NCIA - [security] Burn paper OTP tokens against the stored counter. [Claude Opus 5.5 (1M context), iglocska] - HOTP tokens were checked against the counter cached in the session at password time, so a session opened earlier could reuse a burned token and rewind the counter; verify against the stored counter under a lock and drop the cached login once it succeeds - as reported by Tanguy Snoeck of NCIA - [security] Apply the thread ACL when posting to a discussion. [Claude Opus 5.5 (1M context), iglocska] - posts/add only refused org-only threads, so a user outside a sharing group or unable to see the event could read the quoted post and thread title and post into its discussion - as reported by Bastien Bossiroy and Célien Desteucq of NCIA - [security] Validate the event graph preview and stop rendering it as HTML. [Claude Opus 4.8, iglocska] - the event graph preview_img was stored unvalidated and rendered into an img src by string concatenation, a stored XSS; validate it as a base64 PNG data URL and build the preview img via the DOM instead - as reported by Bastien Bossiroy of NCIA - [security] Escape the tag name on the taxonomy tag confirmation forms. [Claude Opus 5.5 (1M context), iglocska] - the legacy addTag/disableTag confirmation forms echoed the name from the URL unescaped, a reflected XSS against site admins - as reported by Célien Desteucq of NCIA - [login] enforce TOTP enrolment on AJAX requests. [Claude Opus 4.8, iglocska] - an AJAX request let an unenrolled user skip the forced TOTP setup on an otp_required instance; API keys are unaffected - as reported by Tanguy Snoeck of NCIA - [correlation] fix correlation distribution refresh on event save. [Claude Opus 4.8, iglocska] - correlation update wasn't firing on event edits changing the distribution/sharing_group_id - [security] Apply the object ACL to flattened attributes. [Claude Opus 4.8, iglocska] - Flattening an event dropped the object distribution and sharing-group check, so an attribute inside an object the caller may not see was returned as a top-level attribute of a community event they can - as reported by Wenhao Wu - [security] Scope the related event list to what the caller may read. [Claude Opus 5 (1M context), iglocska] - The related event list was hydrated straight from the correlation table, which authorises against a snapshot of the event's distribution and carries no published flag, so events the caller cannot open were listed with their metadata - as reported by Wenhao Wu - Missing argument error when trying to enrich an object. [Luciano Righetti] Other ~~~~~ - Merge branch 'develop' into 2.5. [iglocska] - Merge branch 'develop' of github.com:MISP/MISP into develop. [iglocska] - Merge pull request #11156 from elhoim/fix-attribute-restore- permission. [Andras Iklody] [medium] fix: [attribute] restore permission check was inverted for perm_modify users - Merge pull request #11146 from MISP/add-contributing-docker-dev-guide. [Luciano Righetti] Add contributing docker dev guide - Merge branch 'develop' of github.com:MISP/MISP into develop. [iglocska] - Merge pull request #11152 from MISP/support-remove-tags-misp-modules. [Luciano Righetti] add: support tag removal via misp-modules enrichments - Add: support for misp-module tag removal. [Luciano Righetti] - Add: contributing with docker dev env guide. [Luciano Righetti] - Merge pull request #11145 from MISP/fix-object-enrichment. [Luciano Righetti] fix: missing argument error when trying to enrich an object v2.4.221 (2026-09-17) --------------------- New ~~~ - [security] Register Security.eventreport_max_fetch_size. [Claude Fable 5.1, iglocska] - new setting bounding the event report URL import response size, default 25 MB - groundwork for fixes reported by Scottish Government - National Cyber Team Backport note (2.4): - dropped the app/Lib/Tools/ServerSettingGroups.php hunk: that registry does not exist on 2.4, where settings are only declared inline in app/Model/Server.php (cherry picked from commit c990bc7237be3033b8bfff9fe74567b96360c76c) - [security] Give CurlClient host pinning, redirect control and a size cap. [iglocska] - host pinning via CURLOPT_RESOLVE, bounded and validated redirects and a response size cap for validated fetches - groundwork for fixes reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 2ed76275054798f4bcf2304ad7e40326693dd189) - [security] Add UrlEgressValidator, a policy-driven outbound URL check. [iglocska] - shared outbound URL policy check (scheme, resolved address, loopback, link-local and private ranges) for every place MISP fetches a URL - groundwork for fixes reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 59cd106775cafb94941fa7354b1a7f54ec920218) Changes ~~~~~~~ - [version] bump. [iglocska] Fix ~~~ - [security] Keep the CSRF check on stateless workflow module execution. [iglocska] - workflows/moduleStatelessExecution sat in unlockedActions, which drops the CSRF check along with the field hash, so a cross-site form post could make a site admin execute any workflow module - the action modules among them, which write blocklist and warninglist entries - with input and parameters of the attacker's choosing - the action now keeps the token check and drops only the field hash its caller cannot produce, and the module dialog, which is the only caller, sends the token in the X-CSRF-Token header - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit f05e0d1c263b211108644fe6f1600ad7fde9b915) - [security] Create the upgrade log and its FIFO root-only. [Claude Fable 5.1, iglocska] - the 2.4 to 2.5 upgrade script captures everything it prints and every setting it writes - the generated supervisor password among them - into /var/log/misp_upgrade.log, but tee created the file under the default umask, leaving it world-readable, as was the FIFO feeding it for the window before it is unlinked - the log and the FIFO are now created 0600, and the log is unlinked first so the mode can never be applied through a symlink left in /var/log - 2.4 counterpart of d5d72ab38, which fixed the four distro installers that only exist on develop; this script carries the same tee/mkfifo pattern - [security] Refuse a MISP export upload whose content is a path or URL. [iglocska] - addMISPExportFile() passed the uploaded file's content to Xml::build() with readFile left at its default, so an .xml upload containing `/tmp/x.xml` or `http://10.0.0.1/` made MISP read that file or fetch that URL and import the result as an event - an arbitrary local file read and a full SSRF for any perm_modify user - the content must now contain a document before it is parsed, and readFile is switched off as well - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit d5f247b91ad3e8ea86feaaa587bf0466c95ea996) - [security] Decode only an XML body that is actually a document. [iglocska] - RequestHandlerComponent decodes an XML body on every write request, and Xml::build() fetches a body that is a bare URL: its readFile guard reads `readFile && http || https`, and && binds tighter than ||, so the https branch is never gated - which made the unauthenticated cspReport endpoint a blind SSRF to any https target reachable from the server - the XML input type is now decoded only when the body contains a document, so the fetch is never reached, whatever the vendored Xml::build() does with a locator - as reported by Niels Teusink of Eye Security Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 716fc49d3816dd17d8aeeee074a12f430edc2a55) - [security] Refuse console path switches in background job arguments. [iglocska] - a job's arguments become the argv of the cake console process that runs it, and ShellDispatcher::_parsePaths() takes -app/-working/-root/-webroot from anywhere in that argv, so the unvalidated message and person fields of events/contact could move the worker's application root into an archive addressed through phar:// and have Cake's own bootstrap include the code inside it, as the web user - job arguments are now refused if they spell one of those switches, closing every call site at once, and the contact form's person flag is cast to a boolean so the switch/value pair cannot be formed at the source - as reported by Niels Teusink of Eye Security Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 120813344f36b8fad15cd917e97b09fa3497156b) - [security] Escape the event id list in the export confirmation form. [iglocska] - the export confirmation form echoed the URL-supplied event id list into a single-quoted JS string via a bare json_encode(), which escapes " but never ', so /events/restSearchExport/["';}...] closed the string and ran script for any logged-in victim who opened the link - the id list is now hex-escaped at the sink (JSON_HEX_TAG|APOS|QUOT|AMP); the Overmind theme's own copy already passed it through an escaped data attribute, but the Default and UiBeta themes both render this view - as reported by Niels Teusink of Eye Security Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit ad4ff238df978d459ac6efe0a58038748fa4a649) - [security] Escape unknown-cluster samples in the galaxies index. [Claude Fable 5.1, iglocska] - the default-theme galaxies index imploded unknown galaxy-cluster tag names into the site-admin notice without escaping, so a tag editor's crafted misp-galaxy tag ran as script for a site admin viewing the page (the Overmind theme already escaped these) - as reported by Jeroen Pinoy Backport note (2.4): - 2.4 still spells the view variables $unkownClustersDetails / $hasUnkwown…; the array_map('h', …) is applied on the 2.4 names and the develop renaming is not carried over (cherry picked from commit ce10436ae989a4580a35ada1557ff9d9107f43ed) - [security] Escape the selected types in the attribute histogram. [iglocska] - histogram.ctp echoed the URL-supplied type list raw into a JS array inside an onClick, so /users/histogram/[...] reflected script into the page for any logged-in victim - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 95b8f21f6be9e20323dd101e7d085fc34765c7b7) - [security] Escape the galaxy name in the statistics galaxy matrix. [iglocska] - statistics_galaxymatrix.ctp interpolated the raw galaxy name through sprintf into HTML, so a perm_galaxy_editor user's crafted galaxy name ran as script for any user opening the galaxy matrix - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 6b7637bf46633e880d8fb9900fa69986eabfc82e) - [security] Reject a forged upload path in the event-report picture upload. [iglocska] - EventReport::uploadPicture probed the caller-supplied tmp_name with file_exists/mime/exif before is_uploaded_file, leaking file existence and image type over arbitrary paths through distinct error messages to any perm_add user - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 9a2a4acfe71eaacfe9305a89483d45772edf16b4) - [security] Reject path traversal in the org-logo filename lookup. [iglocska] - findOrgImage built a file path from the org id, name or uuid and called file_exists, and the org name can hold ../ segments, so a crafted name resolved a png or svg outside the org-image directory (arbitrary read plus an existence oracle); each field value is now required to be a plain filename component - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit e00986075acf47257030caa0298fad7b730a764c) - [security] Strip the client id from module-result event reports. [iglocska] - the handleModuleResults report loop saved each module-produced report without unsetting its id, so a caller who named an existing report id could reparent it into their event and read or overwrite it; the loop now unsets id like the attribute and object loops beside it - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 4c1a03b200fc75854879897c9cfc33a86b965d11) - [security] Authorise the collection sharing group on PUT as well as POST. [iglocska] - collections/add ran the sharing-group usability check and element capture only under an is('post') guard, but CRUDComponent::add() persists on PUT too, so a PUT created a distribution=4 collection targeting a sharing group the user cannot use; the guard now covers put - as reported by Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit c20f5a83621de6c534847e1728a1f5af843079b7) - [security] Refuse to adopt an event report that belongs to another event. [iglocska] - a nested event report was resolved globally by UUID and saved under the outer event, so an event editor who knew a report UUID could reparent, read and overwrite a private report from an event they cannot see; editReport now rejects a UUID that already belongs to a different event - as reported by David André and Jeroen Pinoy Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 43665b9bb6bd39af0db1f38e608bdf2cb84b9dec) - [security] Harden misp modules module choice requirements. [iglocska] - don't allow querying legacy modules - as reported by Jeroen Pinoy (cherry picked from commit 7dfcc4d32970d553e8c39827dac04889e44f94e0) - [security] overwrite of org metadata by sg editors. [iglocska] - could lead to blueprint based SG manipulation - as reported by Jeroen Pinoy (cherry picked from commit f3ec974ee2d72d77311dbb364c70f1aee83a58c2) - [security] Extended event granular restrictions ignored. [iglocska] - only the event restrictions were checked - as reported by Jeroen Pinoy (cherry picked from commit f36634e57b93ad9daa3ab9530b76b9e5cba796e2) - [security] read only api keys can regain full role powers. [iglocska] - as reported by Jeroen Pinoy (cherry picked from commit fd27e592a617f21934f4a2c424e0578287affb36) - [security] insufficient check on http methods for the login() function. [Claude Fable 5.1, iglocska] - leads to bypasses for some security features - as reported by Jeroen Pinoy Backport note (2.4): - 2.4's login() carried the same three method checks; the only conflict was trailing whitespace on a comment line (cherry picked from commit ef4dc19c6d4f029c3173e5fafea75a94c127f8b5) - [security] Sandbox inline-served SVG images. [Claude Fable 5.1, iglocska] - SVG org logos and report pictures were served inline, so their scripts ran on the MISP origin; now sandboxed - as reported by Scottish Government - National Cyber Team Backport note (2.4): - dropped the OrganisationsController::getOrgLogo() hunk: that action does not exist on 2.4 (org logos are served as static files there); the RestResponse::sendFile() sandboxing covers the inline picture paths 2.4 does have (event report pictures, attribute pictures), and the setting description and the test apply unchanged (cherry picked from commit 86496aecc35565c121820b8e60eac9508a516eb3) - [security] Bound and throttle the unauthenticated mail endpoints. [Claude Fable 5.1, iglocska] - forgot() and request_API stored an unbounded, unauthenticated request field twice per call with no throttle - as reported by Scottish Government - National Cyber Team Backport note (2.4): - AppController: the conflict was on the version-number block; 2.4's numbers are kept and only the PRE_AUTH_FLOOD_WINDOW constant is added. __preAuthFloodFilter(), its two call sites, the UsersController cooldown and validation, the Server.php settings, the User.php guard, the AdminShell job fix and the misp.js header all applied unchanged - dropped the app/Lib/Tools/ServerSettingGroups.php hunk (registry absent on 2.4) (cherry picked from commit d75d899be4478a4ae8e870ac1b19ce64fa436c96) - [security] Withdraw the org contributor top list when the org index is hidden. [iglocska] - the org contributor top list named every organisation with events regardless of hide_organisation_index_from_users - raised by the maintainer during the review Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 5e333a1595b788d6a564c1ae6423e22074fc84ad) - [security] Require POST for four remaining state-changing GET actions. [iglocska] - purgeUnusedPictures and three other state-changing actions still accepted GET - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit b4a5486b5ddd078dc11248cbd7f21725fb1f43cf) - [security] Authorise the parent event before showing a signing key. [iglocska] - cryptographicKeys/view returned a protected event's signing key to any authenticated user - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 2edde619b88d2e2711b90e7565118e4b11339286) - [security] Redact template owner emails on privilege, not render mode. [Claude Fable 5.1, iglocska] - listTemplates redacted owner emails on the HTML path only; the REST path returned them verbatim - as reported by Scottish Government - National Cyber Team Backport note (2.4): - ported User::canSeeEmails(), its test and the two dashboard widgets that now share it (2.4's NewUsersWidget carried the same inline expression at a different place) - DashboardsController::listTemplates() is left as it is on 2.4: its REST branch queries with recursive => -1 and never joins User, and its HTML branch blanks every e-mail but the caller's own, so the develop leak (User.email returned verbatim on the REST path) does not exist there (cherry picked from commit fd554c3bd4c8c9eeb0cc2c7a1d8530c4b76908e8) - [security] Reject protocol-relative homepage paths. [Claude Fable 5.1, iglocska] - //attacker.example passed the homepage validator and was emitted to Location after login (open redirect) - as reported by Scottish Government - National Cyber Team Backport note (2.4): - app/Model/UserSetting.php: validate_homepage() takes the develop body and getHomepagePath() is added; the 2.5-only validators the conflict hunk dragged along (validate_theme, validate_event_index_hide_columns, validate_event_template_user_form_mode, validate_dashboard_theme, validate_json) are not ported since their settings do not exist on 2.4 (cherry picked from commit bd454f65a3cc20535c83046164154f58ff96b526) - [security] Apply the caller's ACL to the freetext feed preview correlations. [iglocska] - the freetext preview correlated against every attribute on the instance with no ACL - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit dedb4b297f6df5af69c3aa563aec93c0d44583ee) - [security] Gate the organisation widgets on the org-index permission. [Claude Fable 5.1, iglocska] - three org-naming dashboard widgets ignored hide_organisation_index_from_users, accepted limit=0 and fetched every column - as reported by Scottish Government - National Cyber Team Backport note (2.4): - context-only conflict on a comment line in OrgsContributorsGeneric.php; the develop side was taken unchanged (cherry picked from commit 67892d90ea4fccf5ba99b26f69234cc25d5a1cdf) - [security] Rotate the session id on a new CustomAuth authentication. [iglocska] - CustomAuth wrote the identity into the incoming session id without renewing it (session fixation) - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit e2eb2f058bb226514c6fbecef2d26097499c0837) - [security] Throttle the email OTP verification step. [iglocska] - email_otp() had no brute-force protection; failures are now counted and the challenge burned at the limit - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 8658062ead5a247f48a31f4f8895ea00b9e90076) - [security] Enforce perm_modify on the attribute delete paths. [Claude Fable 5.1, iglocska] - the attribute delete paths checked org membership only, never perm_modify or perm_modify_org - as reported by elhoim (David André) Backport note (2.4): - dropped the deleteSelection() hunk: that action does not exist on 2.4 - deleteSelected()'s inline owner check is replaced by __assertCanModifyEvents([$eventId]) as on develop; the helper and delete() use 2.4's $this->Attribute alias instead of $this->MispAttribute (cherry picked from commit d0a6f963f52169a30898b4fda3468513e56dfa9d) - [security] Authorise the event sharing group when distribution is omitted. [iglocska] - Event::_edit() authorised the submitted sharing group only when distribution was 4; an edit omitting distribution skipped the check - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit cf3ee40265ee102f28dae9ec313abe4162aff8e3) - [security] Authorise the sharing group whenever one is submitted. [Claude Fable 5.1, iglocska] - a submitted sharing_group_id was only authorised when distribution was also sent as 4; omitting distribution skipped the check - as reported by elhoim (David André) Backport note (2.4): - AttributesController::__canUseSharingGroup() now delegates to the new SharingGroup::canUse() as on develop; the only change is the model alias, $this->Attribute on 2.4 rather than $this->MispAttribute (cherry picked from commit 9b1363955579b95e9c2c3c00a85301b0a0880128) - [security] Require POST for the sharing-group quick-edit actions. [iglocska] - the addOrg/removeOrg/addServer/removeServer method guard was commented out, so membership changed on GET - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 3060d93cbac9cde6a3369882774e93f48c185dc4) - [security] Require POST for pruneUpdateLogs and enableWarninglist. [iglocska] - pruneUpdateLogs and enableWarninglist changed state on a bodyless GET - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit cfc8b8a6d3bd1874f24b345e084ab62b3eeee9fb) - [security] Require POST for the blocklist delete action. [iglocska] - the blocklist delete actions removed entries on a bodyless GET - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 9c1346ce178d2430db62e8d8d1e4a2737bd21cae) - [security] Require POST for the server sync, cache and JSON update actions. [Claude Fable 5.1, iglocska] - servers/pull, push, cache and updateJSON changed state on a bodyless GET - as reported by Scottish Government - National Cyber Team Backport note (2.4): - app/View/Servers/index.ctp is a hand-built table on 2.4 rather than the generic index element, so the five pull/push/cache links were converted to Form->postLink() with the same confirmation texts develop uses; the side menu and the preview index already posted - dropped the Overmind views and tests/testlive_collection_sync.py (absent on 2.4); ServersController, diagnostics.ctp and tests/testlive_sync.py applied unchanged (cherry picked from commit 66ecb5acb293f60f78d7ee5d867d03e060fc5955) - [security] Require POST for the feed fetch, cache and toggle actions. [iglocska] - fetchFromFeed, fetchFromAllFeeds, cacheFeeds, enable and disable changed state on a bodyless GET - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 50106c9a01605539c25e22ae0220ad87088a6f7f) - [security] Require POST for cullEmptyEvents. [iglocska] - cullEmptyEvents deleted events on a bodyless GET, which CakePHP never CSRF-validates - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 2b6b3ac904d1cbad0fa0fa3f2a4c9f5b2dfab69b) - [security] Put the user-settings endpoints back under CSRF validation. [Claude Fable 5.1, iglocska] - setTheme, setHomePage and eventIndexColumnToggle were unlocked from CSRF validation - as reported by Scottish Government - National Cyber Team Backport note (2.4): - 2.4 only ever unlocked eventIndexColumnToggle, so that is the one action moved onto _csrfTokenHeaderOnly(); setTheme and setEventTemplateUserFormMode do not exist on 2.4 and setHomePage was never unlocked there (its misp.js caller still gains the header, harmlessly) - dropped the UiBeta/Overmind menu hunks and the setSetting unlockedFields line, which belong to 2.5 features (cherry picked from commit 979337b182ae666fe1387342e20e061613657e83) - Restore session AJAX requests under CSRF validation. [Claude Fable 5.1, iglocska] Backport note (2.4): - ported the legacy-UI part of develop's a0cc702c0 (which also subsumes 4dec289a7): event-graph.js, event-timeline.js, markdownEditor/event-report.js and the REST client populate in misp.js now send X-CSRF-Token; TaxiiServersController puts getRoot/getCollections on _csrfTokenHeaderOnly() instead of switching csrfCheck off; EventsController lists restSearch, getEventTimeline and the three getEventGraph* actions - publish/unpublish are not in the 2.4 list: the legacy publish popup posts a rendered Cake form, so the field hash validates as before - the UiBeta/Overmind view and mispOvermind.js hunks do not apply to 2.4 (cherry picked from commit a0cc702c04aa6c42d7e5479d653038e8c96c9b56) - [security] Grant the REST form-security exemption on the credential. [Claude Fable 5.1, iglocska] - the form-security exemption was granted on _isRest(), which a cross-origin page controls; it is now granted on the API key - as reported by Scottish Government - National Cyber Team Backport note (2.4): - 2.4's AppController granted the same _isRest()-based exemption, so the three AppController hunks, _csrfTokenHeaderOnly(), __carriesApiKey(), the X-CSRF-Token support in BetterSecurityComponent::_validateCsrf(), the csrfToken layout variable and the component test are ported unchanged - BetterSecurityComponent::_validateCsrf() additionally carries the is_array($request->data) guard from 7763db511 (the rest of that commit concerns the 2.5 dashboard endpoints, which 2.4 does not have) - dropped: the per-controller _csrfTokenHeaderOnly() lists for CollectionElements, Collections, ObjectReferences and UserSettings (setEventTemplateUserFormMode) and the Collections/add.ctp JS - on 2.4 those actions are reached through rendered Cake forms that carry _Token fields, or do not exist; the EventTemplates controller, every Themed/UiBeta/Overmind view, the event-templates and Overmind JS, and the dashboard/report_iframe layouts do not exist on 2.4 - the EventsController header-only list follows in the next commit together with the legacy JS callers that need the header (develop's a0cc702c0 / 4dec289a7) (cherry picked from commit f82646727c3d3b92a29d9ae086ca3deed0b540cd) - [security] Refuse HTTP method overrides that empty the request body. [iglocska] - a _method override outside POST/PUT/PATCH/DELETE emptied the request body, which skipped both CSRF and form validation - found during the internal review, not externally reported Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 29af008c47d2cc021b6183a0f119b36c8eabfe65) - [security] Enforce access control in the OnDemand correlation engine. [Claude Fable 5.1, iglocska] - the OnDemand correlation engine matched on attribute value alone, with no distribution, sharing group or org condition - as reported by elhoim (David André) Backport note (2.4): - dropped the runGetAttributeCorrelations() hunk: that method does not exist on 2.4 - 2.4's engine has no _checkEventCanCorrelate()/_nonCorrelatingEvents (a later develop addition), so only the per-user memoisation cache is declared and __collectCorrelations() keeps its 2.4 entry, gaining the cache key and the ACL filtering; every other hunk (createEventConditions() on the related-events lookup, the live-row filter in runGetRelatedAttributes(), removal of the always-true checkCorrelationACL() stub) applied unchanged (cherry picked from commit f51342f304c2f38c18f9bddcf66a33838ab490e6) - [security] prevent passwordless binds to ldap. [Claude Fable 5.1, iglocska] Backport note (2.4): - only the empty-$mispUsername refusal after the LDAP lookup is ported; the empty/omitted-password refusal this commit also added is already covered on 2.4 by 0ee058548 (T18), which rejects an empty or non-string email or password before anything reaches ldap_bind() (cherry picked from commit 0cdd5979e59ff2c6de9a64a6458f9f408d160dc6) - [security] Stop feed redirects leaking credentials and reaching internal hosts. [Claude Fable 5.1, iglocska] - feed redirects were followed with no scheme or destination check and re-sent the feed's auth headers to the new host (SSRF) - as reported by Scottish Government - National Cyber Team Backport note (2.4): - app/Lib/Tools/CurlClient.php: 2.4 already resets the curl handle at the start of the next request; the develop side of the conflicting hunk (a second curl_reset() right after the request, followed by the redirect-following block) was taken as is, which reproduces develop's internalRequest() exactly - app/Model/Feed.php: getFollowRedirect() replaced wholesale with the develop loop; 2.4 has the same __createFeedRequest() and __setupHttpSocket() helpers it relies on (cherry picked from commit 08d6efe24772414a7c66d058a7fc71d0ec620a70) - [security] Refuse loopback and metadata targets in the TAXII discovery lookups. [Claude Fable 5.1, iglocska] - taxii_servers/getRoot and getCollections connected to whatever base URL the form submitted with no check on the target; both now run it through UrlEgressValidator with POLICY_DENY_LOOPBACK, refusing loopback and the cloud metadata address while leaving RFC1918 reachable, since a TAXII server on an internal host is an ordinary site-admin deployment - 2.4 counterpart of 06f541dcf, which replaced an earlier gethostbyname-based check on develop; 2.4's discovery code is different (baseurl + TaxiiServer::queryInstance()) and had no check at all - [security] Validate and bound the event report URL import. [iglocska] - the event report URL import fetched with file_get_contents() and no egress check, timeout, size limit or redirect validation (SSRF) - as reported by Scottish Government - National Cyber Team Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 741c3ac7d3f6e3d3a44626bc87252a8d87c40a37) - [security] Verify TLS peers by default in CurlClient. [iglocska] - CurlClient::$verifyPeer defaulted to null, which curl reads as false, so TLS peers went unverified unless a caller opted in - as reported by elhoim (David André) Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit e06f6985805b5a963a28ef89e9cdfaee0e4d86bb) - [security] Reject empty and non-string credentials in the LDAP and LinOTP authenticators. [iglocska] - empty and non-string credentials reached ldap_bind() and the LinOTP verifier, letting anyone log in as a known directory user - as reported by elhoim (David André) Co-Authored-By: Claude Opus 5 (1M context) (cherry picked from commit 0ee0585486cd2c9df49e4f14d48a32a953666e3a) - [security] Escape taggedAttributes/galaxyAttachedAttributes in event filtering query builder. [elhoim] The taggedAttributes and galaxyAttachedAttributes named URL parameters were copied into the query-builder rules verbatim, while every other value in this template is escaped or cast: searchFor uses h(), the numeric filters use intval(), and the tag/galaxy value lists further down already use array_map('h', ...) with an explicit comment that the values are inserted directly into the DOM. The unescaped values are serialised by JsonTool::encode() and emitted inside a " in the parameter survives encoding, terminates the script element early, and executes attacker-supplied markup in the victim's authenticated session: /events/viewEventAttributes/1/taggedAttributes: EventsController::viewEventAttributes harvests the parameter through _harvestParameters(), which does not sanitise it. Applying h() to these two values (array-aware, matching the existing array_map('h', ...) idiom in this file) escapes the angle brackets and prevents the script element from being closed. (cherry picked from commit de51a16dbd1f1dd0e70e37fbf7fee6173b50caf8) - [security] Enforce event modify ACL on attribute enrichment. [ThomasLcr] AttributesController::enrich() fetched the target attribute with read scope (fetchAttributes) and was gated only by the perm_add ACL, but enrichment persists module-derived attributes into the parent event via MispAttribute::enrichment() -> Event->handleModuleResult()/save() with no event-level authorization. Any authenticated non-read-only user who could merely *view* an event (e.g. a cross-org "all communities" event) could inject arbitrary module-derived attributes into it, while the direct write paths (attributes/add, events/edit) and the sibling events/enrichEvent all correctly returned 403. Add the same __canModifyEvent() gate used by EventsController::enrichEvent() before queueing the enrichment job. Legitimate event owners are unaffected. Verified on a lab instance: pre-fix a cross-org "User" injected an ip-src into another org's event via POST /attributes/enrich/; post-fix the same request returns 403 while the owner's enrichment still succeeds. CWE-862 (Missing Authorization). Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 64f1772fc98d0208dd2b4f881965b089932c0f63) - [security] Escape the event date in the legacy index tables (XSS) [Claude Fable 5.1, iglocska] - the event index