Bernhard Lang asked 2016-05-10 14:34:00 UTC
While playing with your beautiful framework I found a critical security issue which allows to do a directory traversal attack. It is possible to download and delete files on the server.
For example, to download the web.config you can call
http://demo.wisej.com/desktop/resource.wx/web.config
or
http://demo.wisej.com/desktop/download.wx?x=eyJmaWxlIjoid2ViLmNvbmZpZyIsIm5hbWUiOiJ3ZWIuY29uZmlnIiwiZGVsZXRlIjpmYWxzZX0=
Using the download.wx an attacker needs to know that the x-parameter is a base64 encoded string. The decoded example above is {"file":"web.config","name":"web.config","delete":false}
To delete an file an attacker needs to change the delete property to true.
Maybe the resource.wx should only allows files from specific whitelisted folder. The download.wx should use a token generated per session by Application.Download to avoid an information disclosure.
best regards
Bernhard
Bernhard Lang asked 2016-05-10 14:34:00 UTC
While playing with your beautiful framework I found a critical security issue which allows to do a directory traversal attack. It is possible to download and delete files on the server.
For example, to download the web.config you can call
http://demo.wisej.com/desktop/resource.wx/web.config
or
http://demo.wisej.com/desktop/download.wx?x=eyJmaWxlIjoid2ViLmNvbmZpZyIsIm5hbWUiOiJ3ZWIuY29uZmlnIiwiZGVsZXRlIjpmYWxzZX0=
Using the download.wx an attacker needs to know that the x-parameter is a base64 encoded string. The decoded example above is {"file":"web.config","name":"web.config","delete":false}
To delete an file an attacker needs to change the delete property to true.
Maybe the resource.wx should only allows files from specific whitelisted folder. The download.wx should use a token generated per session by Application.Download to avoid an information disclosure.
best regards
Bernhard