View Issue Details

This issue affects 2 person(s).
 268
IDProjectCategoryView StatusLast Update
20435Bug reportsSecuritypublic2026-03-04 08:29
Reporterjarrod.c Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionno change required 
Product Version6.6.x 
Summary20435: Web Cache Deception
Description

Vulnerability

Survey is affected by the following vulnerability: https://www.invicti.com/web-vulnerability-scanner/vulnerabilities/web-cache-deception

Cause

Rewrite rule on line 9: https://github.com/LimeSurvey/LimeSurvey/blob/571bab902ed2a7f0de0e2762a14c57341bc94bb3/.htaccess#L9

Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat268
Complete LimeSurvey version number (& build)6.16.7+260205
I will donate to the project if issue is resolvedNo
Browser
Database type & versionIrrelevant
Server OS (if known)
Webserver software & version (if known)
PHP VersionIrrelevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

tibor.pacalat

tibor.pacalat

2026-02-23 18:46

administrator   ~84273

@jarrod.c Please provide a step by step "how to reproduce".

jarrod.c

jarrod.c

2026-02-23 19:12

reporter   ~84276

  1. Install LimeSurvey
  2. Attempt to access url/?.css or url/?.zip

Expected result: 404 or redirect to the root of the directory or redirect to index.php directly

Actual result: responds with 200 and blindly serves index.php

gabrieljenik

gabrieljenik

2026-03-03 14:57

manager   ~84357

https://github.com/LimeSurvey/LimeSurvey/pull/4736

We are overriding a php ini setting.
If someone was already using a php.ini setting on this value, it could be an issue for them.

DenisChenu

DenisChenu

2026-03-03 15:19

developer   ~84358

Last edited: 2026-03-03 15:19

url/?.css or url/?.zip

? is the parameter separator in the URL. No reason to go to a 404. It must be a 200.

It's index.php?.css the must serves a 200 with index.php

It' not related to the issue reported !

@gabrieljenik : do you have a better link? System for testing?

DenisChenu

DenisChenu

2026-03-03 15:23

developer   ~84360

The issue can be here: https://example.com/dashboard/view/test.css

but server configuration here for caching this URL. Not from LimeSurvey system!
LimeSurvey didn't set any cache for css/js file .
Server configuration issue in my opinion.

DenisChenu

DenisChenu

2026-03-03 15:27

developer   ~84362

No issue on limequery https://shnoulle.limesurvey.net/themeOptions/index/check.css didn't enter in Server cache

gabrieljenik

gabrieljenik

2026-03-03 16:02

manager   ~84366

Yes, it is probably a server configuration.

If LimeSurvey is deployed on a server where session.cache_limiter is set to "" (empty string), public, or private_no_expire, then:

  • No Cache-Control headers would be sent on dynamic page responses.
  • The Web Cache Deception attack would be fully exploitable if a caching layer is present.
    This is a realistic scenario — some frameworks and hosting setups override session.cache_limiter to manage caching themselves.

That is the issue reported.
Maybe (and I am realizing now), we can:

  • Instead of setting up that ini setting
  • Set an alert on the installation script if the ini setting is not "nocache"

What do you think?

thejoshhartmann

thejoshhartmann

2026-03-03 16:28

reporter   ~84368

I work with the original reporter.

Additional insight into our setup:

  • We use the official php:8.5.2-apache container image
  • We do not explicitly configure "session.cache_limiter"
  • Akamai is our cache layer and we only configure it to respect cache-control headers
  • We do not modify any cache-control headers at the apache level
  • We do modify some headers at the apache level, listed below
    <IfModule mod_headers.c>
    Header always append X-Frame-Options SAMEORIGIN
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Content-Type-Options nosniff
    Header set Referrer-Policy "no-referrer-when-downgrade"
    Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
    </IfModule>

    Anything else we can share to help?

gabrieljenik

gabrieljenik

2026-03-03 16:31

manager   ~84369

@thejoshhartmann Please look at the pull request. The edit is very simple.
Please, try it on a test installation of yours.

May be the issue is not much about the application but more about the server configuration in a mix in with the caching layer.
That's kind of the debate. Should the application do something in those cases?

thejoshhartmann

thejoshhartmann

2026-03-03 16:34

reporter   ~84370

We will apply the changes in the PR and test and get back with you.

DenisChenu

DenisChenu

2026-03-03 16:53

developer   ~84371

The original issue is the way cache is managed: it must respect the header and not the name

shnoulle@isis-debian:~$ curl -Is https://shnoulle.limesurvey.net/themeOptions/index/check.css | grep content-type
content-type: text/html; charset=UTF-8
x-content-type-options: nosniff
shnoulle@isis-debian:~$ curl -Is https://shnoulle.limesurvey.net/tmp/assets/9ce1cae5/jquery-ui.min.css | grep content-type
content-type: text/css
x-content-type-options: nosniff
shnoulle@isis-debian:~$ curl -Is https://master.sondages.pro/admin/authentication/sa/login/check.css  | grep -i content-type
Content-Type: text/html; charset=UTF-8
shnoulle@isis-debian:~$ curl -Is https://master.sondages.pro/tmp/assets/ca67999b/jquery-ui.min.css  | grep -i content-type
Content-Type: text/css
DenisChenu

DenisChenu

2026-03-03 16:56

developer   ~84372

You can set this setting in your config.php file

thejoshhartmann

thejoshhartmann

2026-03-03 17:11

reporter   ~84373

Some additional context:

Our vulnerability scanner is checking specifically for this vulnerability. Its doing this by checking responses to the following URLs. (I've used your domain as an example)

If those requests return a 200, its going to flag it as vulnerable.

As an example, your domain is responding the same way and would be marked "vulnerable"

[root@localhost ~]$ curl -I https://shnoulle.limesurvey.net/?.css
HTTP/2 200 
server: nginx
date: Tue, 03 Mar 2026 16:09:25 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
set-cookie: PHPSESSID=3a2c9ba83b2d12d42b5909d1c99d364b; path=/; secure; HttpOnly
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
strict-transport-security: max-age=63072000; includeSubdomains;
DenisChenu

DenisChenu

2026-03-03 17:27

developer   ~84375

If those requests return a 200, its going to flag it as vulnerable.

No ! no ! no !!!

It's an issue in your scanner: https://en.wikipedia.org/wiki/Query_string

thejoshhartmann

thejoshhartmann

2026-03-03 17:32

reporter   ~84376

Its not just my scanner... I just showed you that curl returns a 200 with those erroneous URLs on your own service... Even Chrome and Firefox will load your index.php and return a 200.

If the file doesn't exist, and the URL isn't a directory with an index.php, it should redirect instead of rewrite. This would solve the issue.

DenisChenu

DenisChenu

2026-03-03 17:32

developer   ~84377

$ curl -I https://www.google.com/?.css
HTTP/2 200 
content-type: text/html; charset=ISO-8859-1

Any website must return a 200 with /?{anything} , it's not a security issue

DenisChenu

DenisChenu

2026-03-03 17:34

developer   ~84378

If the file doesn't exist, and the URL isn't a directory with an index.php, it should redirect instead of rewrite. This would solve the issue.

You do not call ?.css file : you call the default index with parameters .css ! all characters after ? are parameters !
Please : read wikipedia !

DenisChenu

DenisChenu

2026-03-03 17:35

developer   ~84380

@c_schmitz : my opinion here : No change required

thejoshhartmann

thejoshhartmann

2026-03-03 17:50

reporter   ~84381

You are correct. Anything after ? is being passed as a parameter.

For some reason, our scanner is hitting <url>/?.css to test this and not <url>/index.php/style.css like they explain in their vulnerability guide.

The biggest thing it wants is that cache-control headers get applied based on content-type and not file extension.

Thank you for your time and experience. I will reach out to our scanner vendor and ask why this is happening.

c_schmitz

c_schmitz

2026-03-04 08:29

administrator   ~84382

@thejoshhartmann No worries. Thanks for caring!
I am closing the issue for now.

Issue History

Date Modified Username Field Change
2026-02-23 18:18 jarrod.c New Issue
2026-02-23 18:46 tibor.pacalat Note Added: 84273
2026-02-23 18:46 tibor.pacalat Bug heat 250 => 252
2026-02-23 19:12 jarrod.c Note Added: 84276
2026-02-23 19:12 jarrod.c Bug heat 252 => 254
2026-02-23 19:46 guest Bug heat 254 => 260
2026-02-24 10:38 tibor.pacalat Assigned To => gabrieljenik
2026-02-24 10:38 tibor.pacalat Status new => assigned
2026-03-03 14:57 gabrieljenik Assigned To gabrieljenik => DenisChenu
2026-03-03 14:57 gabrieljenik Status assigned => ready for code review
2026-03-03 14:57 gabrieljenik Note Added: 84357
2026-03-03 14:57 gabrieljenik Bug heat 260 => 262
2026-03-03 15:19 DenisChenu Note Added: 84358
2026-03-03 15:19 DenisChenu Bug heat 262 => 264
2026-03-03 15:19 DenisChenu Note Edited: 84358
2026-03-03 15:23 DenisChenu Note Added: 84360
2026-03-03 15:27 DenisChenu Note Added: 84362
2026-03-03 15:27 DenisChenu File Added: Capture d’écran du 2026-03-03 15-27-39.png
2026-03-03 16:02 gabrieljenik Note Added: 84366
2026-03-03 16:28 thejoshhartmann Note Added: 84368
2026-03-03 16:28 thejoshhartmann Bug heat 264 => 266
2026-03-03 16:31 gabrieljenik Note Added: 84369
2026-03-03 16:34 thejoshhartmann Note Added: 84370
2026-03-03 16:53 DenisChenu Note Added: 84371
2026-03-03 16:56 DenisChenu Note Added: 84372
2026-03-03 17:11 thejoshhartmann Note Added: 84373
2026-03-03 17:27 DenisChenu Note Added: 84375
2026-03-03 17:32 thejoshhartmann Note Added: 84376
2026-03-03 17:32 DenisChenu Note Added: 84377
2026-03-03 17:34 DenisChenu Note Added: 84378
2026-03-03 17:34 DenisChenu Assigned To DenisChenu => c_schmitz
2026-03-03 17:35 DenisChenu Note Added: 84380
2026-03-03 17:50 thejoshhartmann Note Added: 84381
2026-03-04 08:29 c_schmitz Note Added: 84382
2026-03-04 08:29 c_schmitz Bug heat 266 => 268
2026-03-04 08:29 c_schmitz Status ready for code review => closed
2026-03-04 08:29 c_schmitz Resolution open => no change required