Skip to content

Commit f7a8c22

Browse files
authored
Comments from @d4715 (#216)
1 parent 51e5de8 commit f7a8c22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/releases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ Or modify the value of `APP_KEY` in your `.env` file. This will also invalidate
5050

5151
#### The vulnerability
5252

53-
This vulnerability miss-uses the `$path` variable sent to the server, which is used to access the photos via the `SecurePathController`.
53+
This vulnerability misuses the `$path` variable sent to the server, which is used to access the photos via the `SecurePathController`.
5454
We wrongly assumed that `Storage::disk(StorageDiskType::LOCAL->value)->path($path);` was protected against path traversal attacks which lead to this vulnerability.
5555

56-
When both the encrypted links and the temporary links are disabled, it is possible to call the endpoint with fictitious path values. Ironically, by enabling either of the functionality, the endpoint becomes secure again.
56+
When both the encrypted links and the temporary links are disabled, it is possible to call the endpoint with path values that are out of scope. Ironically, by enabling either of the functionality, the endpoint becomes secure again.
5757

5858
#### The fix
5959

6060
We applied defense in depth:
6161

62-
1. when neither functionality are enabled, we directly return a 401/403 error on any call to `/image/{path}`.
63-
2. when either of the functionality are enabled, we check that the `$path` value generated by `Storage::disk(StorageDiskType::LOCAL->value)->path($path);` is within the intended image directory. Should this happen, we return a 418 error code (I'm a teapot) which can later be used to detect malicious calls and combined with fail-2-ban to block the IP address of the attacker.
62+
1. when neither functionality is enabled, we directly return a 401/403 error on any call to `/image/{path}`.
63+
2. when either of the functionalities are enabled, we check that the `$path` value generated by `Storage::disk(StorageDiskType::LOCAL->value)->path($path);` is within the intended image directory. Should this happen, we return a 418 error code (I'm a teapot) which can later be used to detect malicious calls and combined with fail-2-ban to block the IP address of the attacker.
6464

6565
#### Credits
6666

0 commit comments

Comments
 (0)