Skip to content
December 2, 2026
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • ADVISORIES
    • All vendors
    • Microsoft
    • Cisco
    • Fortinet
    • Ivanti
    • Linux
    • Citrix
    • WordPress
    • Oracle
    • Google
    • Apple
    • VMware
    • Palo Alto Networks
    • Atlassian
    • Apache
    • Adobe
    • SAP
  • CVE Data
    • CVE Watchtower
    • Top Exploited CVEs
    • CVE Stats by Vendor
    • Q3 2026 Report
    • CVE Alerts
    • CVE Alert Settings
    • Pricing
  • Cyber Criminals
  • Data Leak
  • Free Security Tools
    • Base64 / URL Encoder & SHA Hash Generator
    • CVSS 3.1 Calculator & Vector Decoder
    • DNS Lookup Tool
    • IP Subnet Calculator & CIDR Reference
    • SSL Certificate Viewer & X.509 Decoder
    • Whois Lookup Tool
  • Malware
  • Vulnerability News
Light/Dark Button
  • Home
  • Technique
  • Session mechanism in the details
  • Technique

Session mechanism in the details

Do Son December 28, 2017 5 minutes read
Session mechanism

Session mechanism

In addition to using cookies, Web applications often use Session to record client status. A session is a mechanism used by the server to record the status of the client. It is simpler to use than the cookie, which in turn increases the storage pressure on the server.

Image: owasp

What is Session?

A session is another mechanism to record the status of the client, the difference is that the cookie is stored in the client browser, and the session is saved on the server. When the client browser accesses the server, the server records the client information in some form on the server. This is Session. When the client browser visits again, it only needs to find the status of the client from the Session.

If the cookie mechanism is to determine the identity of the client by checking the “pass” on the client, then the Session mechanism is to confirm the identity of the client by checking the “client list” on the server. Session equivalent to the program created on the server a customer file, customer visit only need to check the customer file table on it.

To achieve user login

The corresponding Session class javax.servlet.http.HttpSession category. Each visitor corresponds to a Session object, all of the client’s state information is stored in this Session object. The Session object is created when the client requests the server for the first time. A session is also a key-value property pair that reads and writes customer state information using the getAttribute(Stringkey) and setAttribute(String key, Objectvalue) methods. Servlet through the request.getSession() method to obtain the client’s Session.

Pay attention to the Session Session directly saved Person object and Date class object, to use than Cookie convenient.

When multiple clients execute a program, the server saves multiple client sessions. Get Session also do not need to declare the access to the Session. Session mechanism determines that the current client will only get their own Session, and will not get someone’s Session. The client’s sessions are also independent of each other, not visible to each other.

Tip: Session is easier to use than Cookie, but too many sessions stored in the server’s memory can put pressure on the server.

Session lifecycle

Session saved on the server. In order to obtain higher access speed, the server generally Session in memory. Each user will have a separate session. If the Session content is too complicated, memory overflow may occur when a large number of clients access the server. Therefore, the information in the Session should be as concise as possible.

A session is created automatically when the user first accesses the server. Need to pay attention to only visit JSP, Servlet and other procedures will create a Session, visit only static resources such as HTML, IMAGE and will not create a Session. If you have not generated a Session, you can also use request.getSession (true) to force the session to be generated.

After the Session is generated, as long as the user continues to access the server, the server updates the last access time of the Session and maintains the session. Each time a user accesses the server, regardless of whether the session is read or written, the server considers the user’s session “active” once.

Session is valid

Because there will be more and more users to access the server, so Session will be more and more. To prevent memory overflow, the server will not an active session for a long time from the memory to delete. This is the Session’s timeout. If more than the timeout did not visit the server, the Session will automatically expire.

The timeout of the session is the maxInactiveInterval property, which can be obtained through the corresponding getMaxInactiveInterval() and modified by setMaxInactiveInterval(longinterval).

Session timeout can also be modified in web.xml. In addition, Session can be invalidated by calling Session’s invalidate () method.

Session on the browser requirements

Although the Session is stored on the server and is transparent to the client, its normal operation still requires client-side browser support. This is because Session requires the use of cookies as an identifier. The HTTP protocol is stateless. The Session cannot determine whether it is the same client based on the HTTP connection. Therefore, the server sends a cookie named JSESSIONID to the client browser whose value is the Session id (ie, HttpSession.getId() the return value). Session based on the cookie to identify whether the same user.

The cookie is automatically generated by the server, its maxAge property is generally -1, which means that only the current browser is valid, and the browser window is not shared, close the browser will lapse.

Therefore, when two browser windows of the same machine access the server, two different sessions are generated. Except for new windows opened by links, scripts, etc. in the browser window (ie, not double-click on an open window such as a desktop browser icon). Such sub-window will share the parent window’s Cookie, it will share a Session.

Note: The new browser window will generate a new Session, except the child window. Child window will share the parent window Session. For example, right-clicking on a link and selecting “Open in a new window” in the pop-up shortcut menu will allow the child window to access the parent’s Session.

What if the client browser disables cookies or does not support cookies? For example, most mobile browsers do not support cookies. Java Web Another solution provided: URL address rewriting.

URL address rewriting

URL address rewriting is a solution that does not support cookies for clients. The principle of URL address rewriting is to rewrite the id information of the user Session to the URL address. The server can parse the rewritten URL for the Session’s id. This allows you to use the Session to record user status even though the client does not support cookies.

Tags: Session mechanism

🚨 Active Exploits in the Wild

  • CVE-2026-125615CVSS 9.8
    Movable Type provided by Six Apart Ltd. contains an OS command injection vulnerability (CWE-78). If a remote unauthenticated...
    Watchtower Verified📅 Updated: Dec 1, 2026
  • CVE-2023-54424CVSS 8.7
    JIESHUN JieLink+ Intelligent Terminal Operation Platform contains a SQL injection vulnerability that allows unauthenticated attackers to execute arbitrary...
    Watchtower Verified📅 Updated: Dec 1, 2026
  • CVE-2023-54425CVSS 9.3
    Kedacom Phoenix surveillance platform streaming media server through 1R2SP8Fix5L contains an unrestricted file upload vulnerability in the /pmc-bin/upload_fcgi...
    Watchtower Verified📅 Updated: Dec 1, 2026
  • CVE-2026-61500CVSS 9.3
    Rejetto HFS 3.0.0 through 3.2.0 derives its session-cookie signing key from the non-cryptographic Math.random() generator and discloses outputs...
    CISA KEV📅 Added to KEV: Nov 30, 2026
  • CVE-2026-125160CVSS 6.3
    Files uploaded through FileUpload or ImageUpload elements are stored in an unguessable sub-folder that remains the same for...
    CISA KEV📅 Added to KEV: Nov 30, 2026
  • CVE-2026-125812CVSS 9.8
    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in WP Media WP Rocket wp-rocket...
    Admin intel📅 Updated: Nov 29, 2026
  • CVE-2026-120705CVSS 8.6
    GeoServer exposes the built-in WFS 2.0 stored query `urn:ogc:def:query:OGC-WFS::GetFeatureById` through the public `GetFeature` operation. The stored query substituted...
    CISA KEV📅 Added to KEV: Nov 27, 2026
  • CVE-2026-129243CVSS 8.8
    A `service` parameter with a prefix, such as `service=x/WFS`, was resolved to the WFS service by the dispatcher,...
    CISA KEV📅 Added to KEV: Nov 27, 2026
Powered by CVE Watchtower

Search

CVE ALERTS
📈

EPSS Spike Alerts
Catch risk spikes before they make headlines.

🎯

Custom EPSS/CVSS
Set score thresholds to effectively filter noise.

🛡️

Exploit Intel
Real-world exploit signals beyond the KEV catalog.

🐙

GitHub Issues
Auto-create alert tickets without duplication.

📬

Weekly Digest
Clean summaries, eliminating email spam.

🏷️

Watchlist Groups
Tag vulnerabilities by team (Infra/AppSec/SOC).

🔀

Smart Routing
Route chat channels based on severity levels.

🚨

RBP Tracker
Early warning detection and tracking system.

Get free CVE alerts Pro from $7/mo

Critical Vulnerabilities

  • CVE-2026-58982CVSS 9.8
    In isEapOnlySafeMethod of EapSessionConfig.java, there is a possible permission bypass due to a logic error in the code....
    📅 Updated: Dec 2, 2026
  • CVE-2026-58983CVSS 9.8
    In isEapOnlySafeMethod of EapSessionConfig.java, there is a possible permission bypass due to a logic error in the code....
    📅 Updated: Dec 2, 2026
  • CVE-2026-58888CVSS 9.8
    In wpa_bss_update of bss.c, there is a possible use-after-free due to a logic error in the code. This...
    📅 Updated: Dec 2, 2026
  • CVE-2026-58896CVSS 9.8
    In multiprecision_fast_mod_P256 of p_256_multprecision.cc, there is a possible permission bypass due to a logic error in the code....
    📅 Updated: Dec 2, 2026
  • CVE-2026-58897CVSS 9.8
    In multiple locations, there is a possible permission bypass due to a logic error in the code. This...
    📅 Updated: Dec 2, 2026
  • CVE-2026-58831CVSS 9.8
    In multiple locations, there is a possible use-after-free due to a logic error in the code. This could...
    📅 Updated: Dec 2, 2026
  • CVE-2026-49929CVSS 9.8
    In hostapd_process_ml_assoc_req of ieee802_11_eht.c, there is a possible out-of-bounds write due to an incorrect bounds check. This could...
    📅 Updated: Dec 2, 2026
  • CVE-2026-133347CVSS 9.4
    Joomla! Core - [20261201] - Core - PHP object injection through file cache guard handling in Joomla 1.5.0-5.4.11,...
    📅 Updated: Dec 2, 2026
Powered by CVE Watchtower

Daily CyberSecurity

  • About Daily CyberSecurity
  • Advertise with us
  • Submit Press Release
  • Announcement
  • Editorial Policy
  • Corrections Policy
  • Contact
  • Login
  • Disclaimer
  • DMCA
  • Privacy Policy

When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

  • CVE Watchtower
  • CVE Statistics by Vendor 2026
  • Q3 2026 Report
  • Top Exploited CVEs
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube
© 2017 - 2026 Daily CyberSecurity. All Rights Reserved.