Fix/protect celery progress #2238
Closed
hansegucker
wants to merge 0 commits from
fix/protect-celery-progress into master
pull from: fix/protect-celery-progress
merge into: aleksis:master
aleksis:master
aleksis:3960-extend-slideiterator
aleksis:1625-migrate-to-vuetify-4
aleksis:remove-vite-legacy-plugin
aleksis:weblate-frontend
aleksis:weblate
aleksis:renovate/selenium-4.x
aleksis:1644-dahsboard-widget-creation-broken
aleksis:renovate/node-26.x
aleksis:renovate/django-health-check-4.x
aleksis:renovate/django-countries-9.x
aleksis:1643-calendar-dashboardwidgets-throw-500er-error
aleksis:renovate/django-dbbackup-5.x
aleksis:1064-backchannel-logout
aleksis:sis2-with-sl
aleksis:fix/adapt-some-urls
aleksis:1533-notifications-reminders-for-events-todos
aleksis:1294-expose-free-busy-state-in-ui-for-personal-events
aleksis:1303-correctly-implement-recurring-todos-with-amends-recurrence-id
aleksis:1345-introduce-annotate-methods-for-more-person-related-rules
aleksis:1603-search-index-is-deleted-on-cache-flush
aleksis:1068-oidc-rp-initiated-registration
aleksis:1065-oidc-device-code-grant-flow
aleksis:1599-vite-build-fails-with-too-many-apps
aleksis:fix/sort-models
aleksis:1066-oidc-dynamic-client-registration
aleksis:tmp-ticdesk-dev
aleksis:ticdesk-search-map
aleksis:cherry-pick-2b8d2e01
aleksis:643-one-time-login-links
aleksis:1461-birthday-calendar-oom
aleksis:tmp-ticdesk-related-names-for-paweljong
aleksis:1459-manifest-json-not-found
aleksis:integrate-disable-into-usecrud
aleksis:update-container-image-base-to-trixie
aleksis:check/update-pyproject-toml
aleksis:check/update-builddeps-package-json
aleksis:check/update-prettier-ignore
aleksis:1445-todo-list-broken
aleksis:1364-track-date-of-beginning-and-end-of-group-membership
aleksis:1259-generalise-places
aleksis:use-object-form-reactivity
aleksis:1435-cruddaylist-does-not-detect-changes-in-existing-intervals
aleksis:tmp-ticdesk
aleksis:stable/4.0.0
aleksis:1366-frontend-for-creating-and-modifying-generic-personrelationships
aleksis:master-without-vue-3
aleksis:1376-expand-row-feature-of-v-data-table-doesn-t-work-when-items-include-date-time-objects
aleksis:release/4.1.0.dev2
aleksis:1372-fix-import-of-crudlist
aleksis:1353-adapt-chipselectfield
aleksis:check/update-eslint-rc-js
aleksis:check/update-tox-ini
aleksis:improve-selenium-startup
aleksis:1268-add-specific-availability-planning-frontend
aleksis:1343-fix-person-related-permissions
aleksis:newer-and-rebased-migrate-crud-to-vue-3-and-generalize
aleksis:1314-fix-handling-of-end-datetime-in-calendar-events-query
aleksis:migrate-to-uv
aleksis:tmp-ticdesk-4-0
aleksis:fix-inline-crud-list-is-create
aleksis:tmp-split-calendar-event-dialog
aleksis:release/4.1.0
aleksis:1260-refactor-account-registration-form-and-generalize-parts-of-it
aleksis:add-datacheck-fix-in-changelog
aleksis:1232-group-calendars
aleksis:1251-registryobjects-are-their-own-parent-registries
aleksis:1209-introduce-django-rest-framework-serializers
aleksis:1162-strange-behaviour-with-personal-events
aleksis:revert-7fe8b8b1
aleksis:check/delete-eslint-rc-js
aleksis:check/update-gitignore
aleksis:stable-3.2
aleksis:stable-3.1
aleksis:update/eslint
aleksis:1158-add-sorting-functionality-to-get_single_events
aleksis:1055-introduce-sub-school-terms
aleksis:1082-colorfield-sometimes-returns-8-digit-alpha-color-hex-code
aleksis:test-build
aleksis:emit-extracted-items-from-save-event
aleksis:886-prevent-graphql-query-mutation-name-collisions
aleksis:release/3.2.1
aleksis:1038-make-dialogobjectform-send-a-diff-on-edit-instead-of-the-whole-object
aleksis:release/3.1.6
aleksis:fix/counter-chip
aleksis:1021-allow-matching-of-social-accounts-to-local-accounts-by-email
aleksis:991-set-title-attribute-for-all-unclear-frontend-spots
aleksis:update-docs-without-release-distribution
aleksis:850-do-not-restart-vite-serve-on-every-uwsgi-reload
aleksis:991-use-tooltips-for-all-unclear-frontend-spots
aleksis:983-add-groups-by-person-query
aleksis:826-otp-token-emails-don-t-contain-anything-besides-the-token
aleksis:781-error-if-creating-a-new-school-term-without-a-start-and-end-date
aleksis:966-allow-setting-of-custom-queryset-when-creating-calendar-feeds
aleksis:tmp-for-add-simple-course-book-list
aleksis:release/3.2.0
aleksis:868-introduce-uuid-field-for-extensiblemodel
aleksis:958-introduce-parent-model-resource
aleksis:954-evaluate-strawberry-and-strawberry-django
aleksis:948-error-handling-with-personal-event-creation-is-not-usable
aleksis:fix-custom-events-fss
aleksis:923-introduce-vue-styleguidist
aleksis:899-move-person-type-fields-into-constant
aleksis:892-remove-model-extension-api
aleksis:manage-holidays
aleksis:831-data-management-for-the-model-room
aleksis:fix/oauth-toolkit-migration
aleksis:release-3.0
aleksis:stable-2.12
aleksis:819-fix-some-minor-issues-in-graphql-queries
aleksis:fix-container-image
aleksis:stable-2.11
aleksis:stable-2.10
aleksis:stable-2.13
aleksis:806-expose-string-representation-of-models-via-graphql-api
aleksis:800-move-generic-components-from-aleksis-app-plank-to-core
aleksis:debug-foo
aleksis:oidc-docs
aleksis:migrate-to-vue3
aleksis:789-remove-syncable-fields
aleksis:remove/ical-feed
aleksis:194-enable-async-framework-channels
aleksis:726-dynamically-build-vue-forms
aleksis:766-selfclosing-components-in-vue_base-html-break-the-page
aleksis:492-follow-up-view_persons_rule-not-usable-due-to-use-of-queryset_rules_filter
aleksis:751-include-fields-of-non-extensible-model-in-syncable-fields
aleksis:kort-core
aleksis:feature/vuejs
aleksis:717-docker-improve-image-size-by-fixing-cleanup-layer
aleksis:build-improvements
aleksis:697-3-0-meta-issue-for-graphql-back-end-and-vue-js-frontend
aleksis:185-create-notifications-for-announcement
aleksis:stable-2.7
aleksis:update/translation-files-13
aleksis:update/translation-files-12
aleksis:599-add-oauth-oidc-tests
aleksis:i10n-ru-ua
aleksis:tmp/cbes
aleksis:do-release-2.9
aleksis:docs/notifications
aleksis:180-add-template-management
aleksis:fix-import
aleksis:653-remove-cachalot
aleksis:635-test-e-mail-button
aleksis:397-dedicated-public-dashboard
aleksis:396-external-link-widet-auto-discovery
aleksis:511-allow-custom-redirect-uri-schemes
aleksis:update/translation-files-8
aleksis:585-barcode-widget-for-person-fields
aleksis:dot-1.6.2
aleksis:281-corporate-design-for-html-mails
aleksis:592-oauth2-broken-in-2-4
aleksis:574-rewrite-password-change-templates
aleksis:reduce-docker-steps
aleksis:571-age-calculation-broken
aleksis:559-oauth-add-feature-to-limit-apps-to-groups
aleksis:feature/push-notifications
aleksis:feature/i18n-maintenance
aleksis:fix/oauth-skip-auth-detail
aleksis:523-integrate-sentry-for-performance-and-error-tracing
aleksis:prepare-release-2.1.dev0
aleksis:release/2.0
aleksis:387-jwt-provider-consumer-support
aleksis:update/translation-files
aleksis:496-service-worker-safari-does-not-support-broadcastchannel-api
aleksis:group-members-permissions
aleksis:prepare-release-2.0b2
aleksis:fix/trans-conflicts
aleksis:bp-2.0-use-importlib-instead-of-pkg-resources
aleksis:update/translation-files-2.0b0-1
aleksis:test-migration-test
aleksis:376-prevent-deep-linking-to-media-files
aleksis:feature/build-icons-automatically
aleksis:421-update-to-django-3-2
aleksis:set-sast-config-1
aleksis:feature/test-selenium-capabilities
aleksis:arg-apps
aleksis:feature/review-app
aleksis:test-docker-app-version
aleksis:feature/allow-app-source
aleksis:fix-ci-config
aleksis:feature/curlylint
aleksis:feature/gin-index-on-ext-data
aleksis:backup-over-ssh
aleksis:feature/keep_local_password_ldap
aleksis:340-correctly-implement-the-ckeditor
aleksis:143-mark-menu-entries-as-active-with-sub-sub-menu-entries
aleksis:feature/django-notifs
aleksis:2021-update-copyright
aleksis:catch-error
aleksis:update/poetry
aleksis:selenium
aleksis:269-photo-cropping-broken-2
aleksis:269-photo-cropping-broken
aleksis:fix-docker-build
aleksis:has-person
aleksis:update-poetry-lockfile
aleksis:pages-staging
aleksis:mix/conn-dne
aleksis:236-support-saml-and-oauth2-logins-as-consumer
aleksis:feature/custom-auth-backends-dev
aleksis:dev
aleksis:fix-isort
aleksis:214-add-notification-dashboard-widget-anything-to-notify-of-upcoming-birthdays
aleksis:157-include-django-letsagree
aleksis:215-add-geolocation-of-persons
aleksis:267-lint-add-spell-check
aleksis:291-rename-template-references
aleksis:270-ci-replace-kaniko-with-buildah
aleksis:217-add-support-for-defining-group-types
aleksis:feature/docker-extras
aleksis:153-use-complex-name-field-with-i18n-support
aleksis:debug-docker-build
aleksis:feature/material-admin
aleksis:pages-jonglieren
aleksis:179-group-contact
aleksis:169-support-nextcloud-talk-for-notifications
aleksis:develop-dashboard-feeds
aleksis:134-merge-dashboard-ajax
No reviewers
Labels
Clear labels
Security
TeX
Needs LaTeX template
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
Backend (view code, models, logic, etc.)
part
ci
part
docs
Issue or addition to the documentation
part
frontend
Frontend (templates, etc.)
part
i18n
Translation or internationalisation issue
part
non-technical
Non-technical (policy, maintenance, etc.) issue or discussion
part
packaging
Issue concerning the packaging of AlekSIS and components
prio
1
Priority High
prio
2
Priority Medium
prio
3
Priority Low
release-mr-5.x
size
large
size
medium
size
small
source
customer
Requested by a customer or affiliated user
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
Issue or merge request from other projects using AlekSIS or parts of it
type
breaking
type
bug
Bug
type
feature
New feature
type
refactoring
workflow
blocked
Issue is blocked by another issue
workflow
confirmed
The bug is reproducible and will be fixed
workflow
current-todo
workflow
discussing
Needs to be discussed before implementation
workflow
new-app
Requires new AlekSIS app, which has to be created
workflow
wontfix
The bug is not reproducible or the feature was decided against
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-Core!2238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/protect-celery-progress"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #379
Security advisory
Summary
We use Celery to run tasks asynchronously in the background. Sometimes there are scenarios that users start tasks in the frontend (e. g. a data import) and want to track the progress. For this case, we use celery-progress. celery-progress provides an unprotected API endpoint to allow the frontend JavaScript to refresh the displayed progress bar. Every user, even such who are not logged in, could call this API endpoint for every task.
How could the issue be exploited?
To get information from the API endpoint, an attacker would need a valid task ID. He could get one from an authorized user or by guessing. Iterating is not possible because the task IDs are UUID-like.
What information can be leaked?
In general, status information about tasks like SUCCESS, FAILURE or RETRY don't contain any personal information. But there are sometimes scenarios that custom progress/error messages are also exposed through this API. These messages could include personal information like "Importing the user Jane Doe failed ...".
How does the change fix the issue?
The changed code will link the corresponding user to each task whose progress should be tracked. By wrapping the default endpoint, we check if the user is logged in, and if the currently logged-in user is linked to the provided task ID. If the user isn't permitted to see the status, the endpoint will return a 404. This will also prevent fetching data for tasks that shouldn't be tracked through the frontend.
Is there general advice on how to prevent such issues in the future?
Every team member should check newly added views from third-party libraries if they have a sufficient, integrated authentication mechanism. Generally, adding new apps to the URLconf should be considered carefully. Maintainers should ask the developers in the review if they checked these points.
changed the description
Pull request closed