GHSA-f3qm-vfc3-jg6v

Suggest an improvement
Source
https://github.com/advisories/GHSA-f3qm-vfc3-jg6v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/02/GHSA-f3qm-vfc3-jg6v/GHSA-f3qm-vfc3-jg6v.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-f3qm-vfc3-jg6v
Aliases
Published
2024-02-20T18:03:12Z
Modified
2024-02-20T22:38:25.514585Z
Severity
  • 4.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Possible CSRF attack at questionnaire templates preview
Details

Impact

The CSRF authenticity token check is currently disabled for the questionnaire templates preview as per: https://github.com/decidim/decidim/blob/3187bdfd40ea1c57c2c12512b09a7fec0b2bed08/decidim-templates/app/controllers/decidim/templates/admin/questionnairetemplatescontroller.rb#L11

This was introduced by this commit in the PR that introduced this feature (#6247): https://github.com/decidim/decidim/pull/6247/commits/5542227be66e3b6d7530f5b536069bce09376660

The issue does not imply a serious security thread as you need to have access also to the session cookie in order to see this resource. This URL does not allow modifying the resource but it may allow attackers to gain access to information which was not meant to be public.

Patches

11743

Workarounds

Disable the templates functionality or remove all available templates.

References

11743

Database specific
{
    "nvd_published_at": "2024-02-20T18:15:50Z",
    "cwe_ids": [
        "CWE-352",
        "CWE-918"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-02-20T18:03:12Z"
}
References

Affected packages

RubyGems / decidim-templates

Package

Name
decidim-templates
Purl
pkg:gem/decidim-templates

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.23.0
Fixed
0.27.5

Affected versions

0.*

0.23.0
0.23.1.rc1
0.23.1
0.23.2
0.23.3
0.23.4
0.23.5
0.23.6
0.24.0.rc1
0.24.0.rc2
0.24.0
0.24.1
0.24.2
0.24.3
0.25.0.rc1
0.25.0.rc2
0.25.0.rc3
0.25.0.rc4
0.25.0
0.25.1
0.25.2
0.26.0.rc1
0.26.0.rc2
0.26.0
0.26.1
0.26.2
0.26.3
0.26.4
0.26.5
0.26.7
0.26.8
0.26.9
0.27.0.rc1
0.27.0.rc2
0.27.0
0.27.1
0.27.2
0.27.3
0.27.4