All contributions

kanboard/kanboard

Kanboard

Simple kanban project management software you install on your own server.

Language
PHP
GitHub stars
9,975
Merged changes
4
Project site
kanboard.org

What we changed

We closed an SQL injection in the public iCal feed and an XSS in the analytics modal, where HTML stored in a project name ran in the browser. We also fixed the JSON-RPC batch response and logging in on a subdirectory install.

What this work shows

  • Second-order SQL injection
  • Output escaping against XSS
  • JSON-RPC 2.0 batch requests
  • Session cookie path scope
What was broken

A calendar setting injected SQL

The iCal feeds used the calendar_project_tasks setting as a column name, and escapeIdentifier() passed through anything containing a space unchanged. A stored value of 1 OR 1=1 OR 1 made a project's public feed list tasks from every project. The currency form, meanwhile, saved every field in the request.

How we fixed it

An allow-list of columns and fields

The iCal feed accepts only date_creation or date_started as the start date and replaces any other value with date_started. The currency form saves only application_currency. Both cases are covered by tests.

#5914

What was broken

A project name ran a script

The analytics modal loaded over AJAX printed its title, which contains the project name, without escaping. HTML stored in a project name ran in the browser of whoever opened that project's analytics.

How we fixed it

The title is escaped

The AJAX branch of the analytic/layout.php template prints the title through $this->text->e(), like the other layouts. A test in TemplateTest checks that a tag in the project name reaches the page as plain text.

#5913

What was broken

One forbidden request broke the whole batch

When one request in a JSON-RPC batch touched a resource the caller had no access to, AccessDeniedException escaped the loop in BatchRequestParser. Instead of an array of responses the client got a single 403 error object with a null id.

How we fixed it

A 403 for that request only

The forbidden request gets a 403 error in its own place in the array, with its own id, and the rest of the batch runs as the spec requires. Wrong credentials still fail the whole call with a 401.

#5899

What was broken

Login in a subdirectory looped back

On a subdirectory install the session cookie got Path=/kanboard/, which browsers do not send for /kanboard. After a correct login the user landed back on the login form.

How we fixed it

Cookie path without the trailing slash

A new getCookiePath() method trims the trailing slash and returns / at the root. Tests cover installs at the root, in a subdirectory and in a nested subdirectory.

#5900

Merged changes 4

  1. #5914 fix(ical): only accept known columns as the calendar start date Merged 11 October 2026
  2. #5913 fix(security): escape the project name in the analytic modal title Merged 11 October 2026
  3. #5900 fix(session): scope the session cookie to the directory without a trailing slash Merged 2 October 2026
  4. #5899 fix(api): return a full batch response when one request is forbidden Merged 11 September 2026

What it taught us

In a mature PHP application we can track down a second-order SQL injection and a template XSS, close them with an allow-list and escaping, and add tests that reproduce the attack.

More about this technology: PHP

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.