You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sensitive information that is logged unencrypted is accessible to an attacker who gains access to the logs.
POC
The following code logs user credentials (in this case, their password) in plain text:
package main
import (
"log""net/http"
)
funcserve() {
http.HandleFunc("/register", func(w http.ResponseWriter, r*http.Request) {
r.ParseForm()
user:=r.Form.Get("user")
pw:=r.Form.Get("password")
log.Printf("Registering new user %s with password %s.\n", user, pw)
})
http.ListenAndServe(":80", nil)
}
Instead, the credentials should be encrypted, obfuscated, or omitted entirely:
package main
import (
"log""net/http"
)
funcserve1() {
http.HandleFunc("/register", func(w http.ResponseWriter, r*http.Request) {
r.ParseForm()
user:=r.Form.Get("user")
pw:=r.Form.Get("password")
log.Printf("Registering new user %s.\n", user)
// ...use(pw)
})
http.ListenAndServe(":80", nil)
}
References
M. Dowd, J. McDonald and J. Schuhm, The Art of Software Security Assessment, 1st Edition, Chapter 2 - 'Common Vulnerabilities of Encryption', p. 43. Addison Wesley, 2006. Password Plaintext Storage. CWE-312. CWE-315. CWE-359.
The text was updated successfully, but these errors were encountered:
nordvpn-linux/events/logger/logger.go
Line 48 in dbac8d8
Sensitive information that is logged unencrypted is accessible to an attacker who gains access to the logs.
POC
The following code logs user credentials (in this case, their password) in plain text:
Instead, the credentials should be encrypted, obfuscated, or omitted entirely:
References
M. Dowd, J. McDonald and J. Schuhm, The Art of Software Security Assessment, 1st Edition, Chapter 2 - 'Common Vulnerabilities of Encryption', p. 43. Addison Wesley, 2006.
Password Plaintext Storage.
CWE-312.
CWE-315.
CWE-359.
The text was updated successfully, but these errors were encountered: