Skip to content

Commit 5fd2aa5

Browse files
committed
Added S-30
1 parent d0ac195 commit 5fd2aa5

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ S.No. | Topic
4747
**26** | [Vulnerable Code Snippet - 14](/resources/vulnerable-code-14.md)
4848
**27** | [Vulnerable Code Snippet - 15](/resources/vulnerable-code-15.md)
4949
**28** | [Vulnerable Code Snippet - 16](/resources/vulnerable-code-16.md)
50+
**29** | [Vulnerable Code Snippet - 16](/resources/vulnerable-code-17.md)
51+
**30** | [Vulnerable Code Snippet - 16](/resources/vulnerable-code-18.md)
5052

5153

5254
# SecurityExplained NewsLetter

media/code-18.jpg

211 KB
Loading

resources/vulnerable-code-18.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### SecurityExplained S-30: Vulnerable Code Snippet - 18
2+
3+
#### Vulnerable Code:
4+
5+
![Vulnerable Code](../media/code-18.jpg)
6+
7+
8+
#### Solution:
9+
10+
As per SonarSource, At line 9, the email is transformed to uppercase before its use in the SQL query. On Unicode characters, this process has the unintended effect that two distinct code points may result in the same one.
11+
12+
It can be used to send the password reset token to another email and takeover accounts:
13+
14+
foo@mix.com -> FOO@MIX.com
15+
foo@mıhttp://x.com -> FOO@MIX.com
16+
17+
Interesting Blog: https://t.co/UxdZJQxzc1
18+
19+
##### Code Credits: SonarSource

0 commit comments

Comments
 (0)