Free sample lesson ยท PHP2Shell: From Flaw to Fix
What PHP2Shell puts at risk
Could an anonymous visitor read server secrets without installing a web shell?
Lesson 1 of the Wondering course PHP2Shell: From Flaw to Fix
One bug, three kinds of harm
Could an anonymous visitor read server secrets without ever installing a web shell? With PHP2Shell, that question matters.
The joint researcher overview describes two serious outcomes: unauthenticated code execution and disclosure of sensitive process memory.[[1]](https://www.php2shell.com/)
Add possible service disruption, and you have three separate risks.
- PHP2Shell risks
- Memory disclosure: Threatens confidentiality.
- Code execution: Can break integrity.
- Service disruption: Hits availability.
Memory disclosure threatens confidentiality. Code execution can break integrity. Service disruption hits availability. Checking for only one leaves the other two unexamined.
What each impact means
Remote code execution: an outsider causes the server process to run chosen code.
Memory disclosure: data inside that process becomes visible to someone who should not see it.
Denial of service: legitimate requests cannot be served reliably.
- Code execution
- Memory disclosure
- Denial of service
These map to integrity, confidentiality and availability. They can happen separately.
- Three different losses
Secrets can leave without a shell
Picture a fictional attacker who reads an API token straight out of server memory. No file is created. No shell appears.

Notice the token travels out of process memory while the file system stays unchanged, so no shell or new file is needed for a secret to escape.
This split has been shown in research: Wiz demonstrated memory disclosure separately from code execution.[[2]](https://www.wiz.io/blog/php2shell-php-rce)
A shell is one possible consequence of execution. Confidentiality loss does not require one.
What actually leaks depends on what the PHP process holds and can access.
Sorting the Harbor clues
Fictional Harbor runs a membership website. Its team sees three things: leaked session tokens, an unauthorized content change, and repeated worker crashes.
Leaked tokens point to confidentiality. The content change points to integrity. The crashes point to availability.
Each clue supports one concern.
None of them alone establishes the whole attack chain.
What a demo proves
The reported results are researcher demonstrations, not a census of victims.[[1]](https://www.php2shell.com/)[[2]](https://www.wiz.io/blog/php2shell-php-rce)
A demonstration establishes feasibility under tested conditions.
It does not identify a real victim. It also does not prove every PHP installation is equally reachable.
- It shows
- It does not show
Use demos to know what is possible. Use your own evidence to judge what happened.
Missing evidence is not an all-clear
A common trap: no web shell found, so no sensitive data escaped. That reasoning fails.
A site staying online does not establish that its secrets remained private.
The reverse also holds. A crash alone does not establish that secrets were stolen.
Each property needs its own evidence. Absence of one sign does not rule out the others.
Before claiming full compromise
When you review an affected deployment, start by naming which property each observation supports.
Next, ask what secrets the PHP process held in memory, and what it could access.
Then ask what links one observation to the others. Without that link, you have separate concerns, not a proven chain.
- Name the property: Match each observation to confidentiality, integrity or availability.
- Check memory: Ask what secrets the PHP process held in memory.
- Check reach: Ask what the process could access.
- Find the link: Ask what links one observation to the others.
A remediation review should check all three properties, not only visible takeovers.
Check yourself
Finding no web shell proves that no sensitive data escaped from server memory.
- True
- False
Answer: False
No. Memory disclosure can expose secrets such as API tokens without creating a file or web shell. The absence of a web shell does not establish that confidentiality was preserved.
For PHP2Shell-related observations, leaked session tokens indicate _____ loss, unauthorized content changes indicate _____ loss, and repeated worker crashes indicate _____ loss.
Answer: For PHP2Shell-related observations, leaked session tokens indicate confidentiality loss, unauthorized content changes indicate integrity loss, and repeated worker crashes indicate availability loss.
Leaked tokens reveal private data, so they affect confidentiality. Unauthorized changes alter data, so they affect integrity. Crashes prevent reliable service, so they affect availability.
A PHP process leaks an API token, changes website content, and crashes repeatedly. Which classification is correct?
- Token: confidentiality; content: integrity; crashes: availability
- Token: integrity; content: availability; crashes: confidentiality
- Token: availability; content: confidentiality; crashes: integrity
- All three observations prove only remote code execution
Answer: Token: confidentiality; content: integrity; crashes: availability
The leaked token is a confidentiality loss, the content change is an integrity loss, and the crashes are an availability loss. These impacts can occur separately; one observation does not prove the others.
Keep going
This is lesson 1 of 14 in PHP2Shell: From Flaw to Fix. Next up:
- The runtime beneath your website
- What the exposure numbers mean
- Severity is not exploit probability
- One worker serves many requests
- When memory exhaustion breaks cleanup
Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.